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: | Project infrastructure should be aware of mounted file systems | ||
---|---|---|---|
Product: | projects | Reporter: | Alexander Simon <alexvsimon> |
Component: | Generic Infrastructure | Assignee: | Alexander Simon <alexvsimon> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | apepin, issues, issues, jhavlin, johnjullion, jtulach |
Priority: | P3 | Keywords: | PERFORMANCE |
Version: | 7.3 | ||
Hardware: | PC | ||
OS: | Solaris | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
profiling snapshot of opening file in editor
proposed patch proposed patch, version 2 |
IDE in ergonomics mode, Info:
>Log Session: Friday, January 18, 2013 5:36:33 PM MSK
>System Info:
Product Version = NetBeans IDE Dev (Build 20130117-dd3f9558c33d) (#dd3f9558c33d)
Operating System = SunOS version 5.10 running on x86
Java; VM; Vendor = 1.7.0_11; Java HotSpot(TM) Client VM 23.6-b04; Oracle Corporation
Runtime = Java(TM) SE Runtime Environment 1.7.0_11-b21
Java Home = /usr/jdk/instances/jdk1.7.0_11/jre
System Locale; Encoding = en (nb); ISO646-US
What thread are you talking about? (In reply to comment #2) > What thread are you talking about? File system should not try do file operations with files: - /net/pom.xml - /net/grails-app - /net/nbproject/project.xml where /net is auto-mounted nfs Why not? pom.xml is regular DNS entry. nbproject as well. EDT is not blocked, and I don't think I can do anything in filesystems. The report seems to be too vague, marking invalid. (In reply to comment #4) > Why not? pom.xml is regular DNS entry. nbproject as well. I ageree that /net/pom.xml is valid name. Could you provide example where /net/pom.xml is regular (plain) file? Jarda, looks like it's the same problem as we saw with BaseFileObjectTestHid and had to introduce public static final HashSet<String> AUTOMOUNT_SET = new HashSet<String>(Arrays.asList("set", "shared", "net", "java", "share", "home", "ws", "ade_autofs")); Probably masterfs can optimize some behavior for this folders (i.e. isDirectory, isFile checks) I think this issue can be fixed in NB 7.4 using JDK 7 API. JDK 7 API can detect automount directories so there is no need for explicit list mentioned in comment #7. Such automount directories can be handled differently to optimize isDirectory and isFile. Please evaluate. One more idea: do not use File.exists() to find out if /net/nbproject exists, use java.io.File.listFiles() instead and search results for /net/nbproject. (In reply to comment #9) > One more idea: do not use File.exists() to find out if /net/nbproject exists, > use java.io.File.listFiles() instead and search results for /net/nbproject. On Unix system listFiles can be empty when directory cleared permission, while exists returns true (In reply to comment #8) > JDK 7 API can detect automount directories Can you please tell me how? I can't find a way looking at NIO2 Javadoc. (In reply to comment #10) > (In reply to comment #9) > > One more idea: do not use File.exists() to find out if /net/nbproject exists, > > use java.io.File.listFiles() instead and search results for /net/nbproject. > On Unix system listFiles can be empty when directory cleared permission, while > exists returns true .. but this is not the case for auto-mounted directories like /net (In reply to comment #12) > (In reply to comment #10) > > (In reply to comment #9) > > > One more idea: do not use File.exists() to find out if /net/nbproject exists, > > > use java.io.File.listFiles() instead and search results for /net/nbproject. > > On Unix system listFiles can be empty when directory cleared permission, while > > exists returns true > .. but this is not the case for auto-mounted directories like /net with "/net" even more problems if use listFiles (while No problems with permissions). "/net" list of files can be empty until mount point not used or changing. It's easy to see even in shell: #ls /net enum volvo #ls -d /net/everest #ls /net enum everest volvo so /net/everest is valid even if not in initial listFiles for "/net" => exists more correct, because it force mounting (In reply to comment #11) > (In reply to comment #8) > > JDK 7 API can detect automount directories > Can you please tell me how? I can't find a way looking at NIO2 Javadoc. Here is a sample: http://hg.netbeans.org/releases/file/2360a723964c/cnd.discovery/src/org/netbeans/modules/cnd/discovery/performance/FileSystemChecker.java Is there anyone needing this so much to propose a patch? Ok, It seems FS should not restrict access to /net folder access. Instead clients should not check metainfo in /net folder. First part of the fix was done in the bug #238210 I suggest to fix project owner query. Created attachment 149111 [details]
proposed patch
reuse already defined forbidden folders
I'm fine with patch. The only comment is: Shouldn't we introduce dedicated system property name and use the one from versioning as fallback, like: System.getProperty("project.forbiddenFolders",System.getProperty("versioning.forbiddenFolders", "")) Created attachment 149113 [details]
proposed patch, version 2
fixed forbidden list:
String forbidden = System.getProperty("project.forbiddenFolders", System.getProperty("versioning.forbiddenFolders", ""));
fixed, change set: http://hg.netbeans.org/cnd-main/rev/4ba9dd6fbf68 Integrated into 'main-silver', will be available in build *201409120001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/4ba9dd6fbf68 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixed Bug 225063 Project infrastructure should be aware of mounted file systems |
Created attachment 130363 [details] profiling snapshot of opening file in editor Try to open file located in NFS (for example "/net/host/export/...."). IDE open file about 40 seconds. Root cause is: IDE try check meaningless files ("/net/pom.xml", "/net/grails-app", "/net/nbproject/project.xml") several times.