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 173970 - Building tooltip calls versioning.Utils.canWrite()
Summary: Building tooltip calls versioning.Utils.canWrite()
Status: RESOLVED WORKSFORME
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Miloslav Metelka
URL: http://statistics.netbeans.org/except...
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2009-10-07 13:28 UTC by mklaehn
Modified: 2012-10-26 13:06 UTC (History)
10 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 158522


Attachments
nps snapshot (8.58 KB, bin/nps)
2009-10-07 13:28 UTC, mklaehn
Details
nps snapshot (256.00 KB, application/nps)
2009-11-23 19:58 UTC, velodiver
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mklaehn 2009-10-07 13:28:29 UTC
Build: NetBeans IDE Dev (Build nbms-and-javadoc-4040-on-091003)
VM: Java HotSpot(TM) Client VM, 14.2-b01, Java(TM) SE Runtime Environment, 1.6.0_16-b01
OS: Windows XP, 5.1, x86

User Comments:
GUEST: Switching to NB. Most likely it was swapped out.


Maximum slowness yet reported was 30324 ms, average is 16682
Comment 1 mklaehn 2009-10-07 13:28:34 UTC
Created attachment 89004 [details]
nps snapshot
Comment 2 Ondrej Vrabec 2009-10-12 12:42:07 UTC
AWT is stuck on java.io.File.canWrite(). 
Versioning has to call this method, is there a chance you don't access FS in AWT? Please evaluate.
The first two calls come from org.openide.nodes.FilterNode, the third then from CloneableEditorSupport.
Comment 3 t_h 2009-10-13 13:47:48 UTC
Maybe PasteAction state could be updated asynchronously out of AWT
Comment 4 velodiver 2009-11-23 19:58:25 UTC
Created attachment 91565 [details]
nps snapshot
Comment 5 misterm 2010-03-29 20:21:45 UTC
It has over 100 duplicates already. Can anyone take a look at it?
Comment 6 Jaroslav Tulach 2010-03-31 07:42:54 UTC
http://statistics.netbeans.org/exceptions/exception.do?id=361926 is about canWrite being slow.

http://statistics.netbeans.org/exceptions/exception.do?id=360317 is about canWrite being slow.

Seems to me that recent reports that took over 10s lead to versioning. But looking at 360270, the versioning is unlikely to be the cause (as there is just a single query canWrite state). There is another thread with does File.listFiles (but again only once), but that may be the cause of the slowdown. Maybe WinNT system is blocked by that query.
Comment 7 Jaroslav Tulach 2010-04-20 11:23:17 UTC
Let's use this issue to track:
http://statistics.netbeans.org/exceptions/exception.do?id=370387

Building an editor tooltip seems to require disk access! That is unfortunate, the CloneableEditorSupport already knows whether the file is read-only or read write.
Comment 8 Vitezslav Stejskal 2010-04-20 13:56:49 UTC
(In reply to comment #7)
> Let's use this issue to track:
> http://statistics.netbeans.org/exceptions/exception.do?id=370387

ReadOnlyFilesHighlighting was added in 6.9 and so the above snapshot has nothing to do with the original snapshots. If somebody suggests how to determine the read-only status of an edited file I can change this highlighting layer. This, however, is unlikely to fix the other problems.
Comment 9 David Strupl 2012-10-25 13:39:12 UTC
Bug prior to 7.0, not touched for the last 2 years --> P4.
Comment 10 David Strupl 2012-10-26 13:06:58 UTC
The last report is over one year now. Probably not a problem any more (or?). Closing as works for me.