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: | AWT thread blocked for 22225 ms. | ||
---|---|---|---|
Product: | editor | Reporter: | jmichelberger <jmichelberger> |
Component: | Parsing & Indexing | Assignee: | Vitezslav Stejskal <vstejskal> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | dima_s_d_s, jmichelberger, jtulach |
Priority: | P3 | Keywords: | PERFORMANCE |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://statistics.netbeans.org/exceptions/detail.do?id=157307 | ||
Issue Type: | DEFECT | Exception Reporter: | 157307 |
Attachments: |
nps snapshot
nps snapshot |
Description
jmichelberger
2009-09-02 15:09:08 UTC
Created attachment 86970 [details]
nps snapshot
RepositoryUpdate.getOwningSourceRoot() is still slow - unfortunately in this case all its calls end up in native java.io.WinNTFileSystem.getBooleanAttributes(). I assume that the machine's disk was busy doing something else. No scanning or other editor tasks were running. From my point of view this is pretty much WONTFIX, but maybe we could somehow cache owning source roots for files opened in the editor. Integrated into 'main-golden', will be available in build *200909251401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/18bc593fd22c User: Vita Stejskal <vstejskal@netbeans.org> Log: #171327: caching owning source root on a Document instance Build: NetBeans IDE Dev (Build 090914) VM: Java HotSpot(TM) Client VM, 14.1-b02, Java(TM) SE Runtime Environment, 1.6.0_15-b03 OS: Linux, 2.6.29.6-desktop-1mnb, i386 User Comments: Maximum slowness yet reported was 22225 ms, average is 9074 Created attachment 88965 [details]
nps snapshot
reproduced in 6.8 M2, btw. Looks like YAGL was hit. You cannot synchronize on the cache while doing I/O. This might be an improvement: diff -r 27d0472b6376 parsing.api/src/org/netbeans/modules/parsing/impl/indexing/RepositoryUpdater.java --- a/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/RepositoryUpdater.java Tue Oct 13 12:52:22 2009 +0200 +++ b/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/RepositoryUpdater.java Tue Oct 13 16:31:19 2009 +0200 @@ -3338,19 +3338,24 @@ } public FileObject findFileObject(URL url) { + FileObject f = null; synchronized (cache) { Reference<FileObject> ref = cache.get(url); - FileObject f = ref == null ? null : ref.get(); + if (ref != null) { + f = ref.get(); + } + } - try { - if (f != null && f.isValid() && url.equals(f.getURL())) { - return f; - } - } catch (FileStateInvalidException fsie) { - // ignore + try { + if (f != null && f.isValid() && url.equals(f.getURL())) { + return f; } - - f = URLMapper.findFileObject(url); + } catch (FileStateInvalidException fsie) { + // ignore + } + f = URLMapper.findFileObject(url); + + synchronized (cache) { if (f != null && f.isValid()) { cache.put(url, new WeakReference<FileObject>(f)); } My previous patch addresses problem as seen in http://statistics.netbeans.org/exceptions/exception.do?id=277998 Hmm, thanks for the patch Jardo. applied the patch, local changeset: 6afe6e6a7058 |