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.

Bug 218203 - Accessing file system in EDT: File.isDirectory on every symbol entered
Summary: Accessing file system in EDT: File.isDirectory on every symbol entered
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Parsing & Indexing (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks: 218138
  Show dependency tree
 
Reported: 2012-09-12 10:59 UTC by Egor Ushakov
Modified: 2012-09-21 02:28 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stacktrace (3.71 KB, text/plain)
2012-09-12 11:00 UTC, Egor Ushakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Egor Ushakov 2012-09-12 10:59:54 UTC
see attached stacktrace, on every symbol entered in the editor I see filesystem access in EDT. This could be very slow if NFS is used.
Comment 1 Egor Ushakov 2012-09-12 11:00:20 UTC
Created attachment 124230 [details]
stacktrace
Comment 2 Egor Ushakov 2012-09-12 14:34:32 UTC
more of that, RepositoryUpdater.getOwningSourceRoot from the stack trace is always called for (jar:file:/ssd/work/cnd-main/nbbuild/netbeans/ide/jsstubs/allstubs.zip!/) which has nothing to do with the source file opened
Comment 3 Tomas Zezula 2012-09-19 13:01:00 UTC
>see attached stacktrace, on every symbol entered in the editor I see filesystem
>access in EDT. This could be very slow if NFS is used.
Not true, it's done just once per single Document, then it's cached as document property.
Comment 4 Egor Ushakov 2012-09-19 13:12:13 UTC
that may be file type dependent, I checked it for c files, I will recheck for java and other files
Comment 5 Egor Ushakov 2012-09-19 13:17:58 UTC
true, in java files it does not trigger on every symbol entered
Comment 6 Egor Ushakov 2012-09-19 13:26:15 UTC
the problem with cnd files is that getOwningSourceRoot is always null for them so there is nothing to cache and so we recheck it every time
Comment 7 Tomas Zezula 2012-09-19 13:33:51 UTC
In this case there is nothing to cache and the cache is empty.
For non c files it's done just once per document.
I can add a tombstone into cache to detect the Documents for which there is no need to do the checking.
In this case even for c files it will be called once.

I am also examining the URLArchiveMapper why it does the isFile call and if it's possible to remove it.
According to dtrace the URLMapper.getFileObject() always do disk touch for archives and non existent files.
The second is understandable but the first should be fixable.
Comment 8 Tomas Zezula 2012-09-19 16:01:25 UTC
Fixed jet-main 1b0f40db6fa0.
The allstubs.zip no more accessed.
Comment 9 Quality Engineering 2012-09-20 02:27:13 UTC
Integrated into 'main-golden', will be available in build *201209200001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/1b0f40db6fa0
User: Tomas Zezula <tzezula@netbeans.org>
Log: #218203:Accessing file system in EDT: File.isDirectory on every symbol entered
Comment 10 Tomas Zezula 2012-09-20 14:08:27 UTC
Handling even non existent roots, jet-main af5328a47ab4
Comment 11 Quality Engineering 2012-09-21 02:28:15 UTC
Integrated into 'main-golden', will be available in build *201209210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/af5328a47ab4
User: Tomas Zezula <tzezula@netbeans.org>
Log: #218203:Accessing file system in EDT: File.isDirectory on every symbol entered