This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Native support for filesystems to avoid polling | ||
---|---|---|---|
Product: | platform | Reporter: | rmatous <rmatous> |
Component: | Filesystems | Assignee: | Jaroslav Tulach <jtulach> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | anebuzelsky, dlipin, err, gorrus, jglick, johnjullion, jtulach, matteodg, olangr, rmatous, tpavek, tzezula, vv159170 |
Priority: | P2 | ||
Version: | 3.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://wiki.netbeans.org/NativeFileNotifications | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | 185135, 190462, 190465, 190467, 190470, 190490, 190491, 194147, 195288, 196914, 197965, 197966, 197985 | ||
Bug Blocks: | 189720 | ||
Attachments: | Demo app |
Description
rmatous
2002-08-02 17:51:07 UTC
I have preliminary support for Unix/FAM, needs to be developed further... Reassigning to new module owner jskrivanek. I don't understand what it means. Could you clarify? Instead of polling for changes of filesystem by calling FileSystem.refresh(), the masterfs implementation could observer the external changes itself: http://search.cpan.org/~mlehmann/Linux-Inotify2-1.2/Inotify2.pm and http://www.relisoft.com/win32/watcher.html Just FYI: - RFE means decline from pure java FS impl. - future NIO2 effort for jdk could be considered as competing solution NIO.2 would I think be the proper internal implementation. (A backport to JDK 6 may be available.) So, let's wait for NIO.2. It's in JDK 7 betas, so it could be supported at least for people running on JDK 7, offering an opportunity to test robustness and possible send bug reports back to the JDK 7 team before the release. In my experiments, listening to every file event created during a clean build of the "gmaven" source tree (consisting of many Maven submodules) and printing each such event does not add a lot of overhead: maybe 3sec to a 30sec build. Listening only to FileObject folders which exist in memory would be far cheaper. Created attachment 78015 [details]
Demo app
Increasing priority, because there is P2 defect in parsing/indexing depending on this. Not in near term planes. Subject to change when JDK7 is released. Meanwhile we have home made "recursive listener" with "external changes" detection. Home made "recursive listener" obviously has some issues (see e.g. #157627), so I'm raising priority to bring more attention to this. Collecting some background info in wiki. Work started in the core-main repository, branch fs_watches_26230 Merged so should be FIXED, right? notifier for Solaris based on gamin or fam library: http://hg.netbeans.org/cnd-main/rev/5fd744c56452 implementation using FEN is still unstable (In reply to comment #16) > implementation using FEN is still unstable You know there is an impl in JDK 7 to use as an example, right? AFAIK it will use /dev/poll and I'm trying to use FEN Are you sure? I'm no expert on this, but SolarisWatchService.java defines constants and structs matching what http://blogs.sun.com/praks/entry/file_events_notification describes. (It's also worth noting that SolarisWatchService.c is very minimal and looks like it could easily be converted to JNA style.) Thanks, I'll have a look! Implemented. Few bugs remain. |