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 193868 - MavenSourcesImpl.checkChanges() calls FileOwnerQuery too much
Summary: MavenSourcesImpl.checkChanges() calls FileOwnerQuery too much
Status: RESOLVED WORKSFORME
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2010-12-28 09:36 UTC by mhuebner
Modified: 2012-11-08 08:34 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 161693


Attachments
nps snapshot (67.35 KB, application/nps)
2010-12-28 09:36 UTC, mhuebner
Details
nps snapshot (22.97 KB, application/nps)
2010-12-28 12:24 UTC, mhuebner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mhuebner 2010-12-28 09:36:05 UTC
Build: NetBeans IDE Dev (Build nbms-and-javadoc-6367-on-101222)
VM: Java HotSpot(TM) Client VM, 16.3-b01, Java(TM) SE Runtime Environment, 1.6.0_20-b02
OS: Windows 7

User Comments:
GUEST: Selecting a propertyfile in the source tree

dominiklambrechts: ctrl/alt/f reordening source

GUEST: trying to go to variable declaration

GUEST: Opening an JFrame Form.



Maximum slowness yet reported was 6520 ms, average is 5325
Comment 1 mhuebner 2010-12-28 09:36:13 UTC
Created attachment 104552 [details]
nps snapshot
Comment 2 Vladimir Voskresensky 2010-12-28 09:44:39 UTC
will evaluate
Comment 3 Vladimir Voskresensky 2010-12-28 09:49:03 UTC
http://statistics.netbeans.org/exceptions/exception.do?id=336476 was fixed in 7.0
all others are about slow MakeProjectFileOwnerQuery.getOwner 
caused by spending all the time in call of 
org.openide.util.lookup.ProxyLookup.lookup
Comment 4 mhuebner 2010-12-28 12:24:50 UTC
Created attachment 104562 [details]
nps snapshot
Comment 5 Jaroslav Tulach 2011-01-08 19:03:17 UTC
ProxyLookup is just called too often (Vladimir check the # of invocations it goes to tens). 

However if we concentrate on the report from Dec 28, then it is clear that org.netbeans.modules.maven.MavenSourcesImpl.checkChanges() calls FileOwnerQuery too much.
Comment 6 Vladimir Voskresensky 2011-01-10 16:10:28 UTC
(In reply to comment #5)
> ProxyLookup is just called too often (Vladimir check the # of invocations it
> goes to tens). 
> 
> However if we concentrate on the report from Dec 28, then it is clear that
> org.netbeans.modules.maven.MavenSourcesImpl.checkChanges() calls FileOwnerQuery
> too much.
You can go this way and change MavenSourcesImpl, but may be it's time to improve FileOwnerQuery with small cache of owners of already detected files?
We have seen that java debugger was improved in times on NFS systems by using cache on own side. 
Now we again propose to change client's code while I think it's worth to improve speed of ALL clients at once just by improving speed of FileOwnerQuery API itself
Comment 7 Jesse Glick 2011-01-12 16:30:13 UTC
A small cache in FOQ seems reasonable.
Comment 8 Milos Kleint 2012-07-26 09:01:19 UTC
(In reply to comment #7)
> A small cache in FOQ seems reasonable.

the crucial part is what invalidates the cache.

additionally the MavenSourcesImpl usage of FileOwnerQuery in contains(FileObject) lets me imagine that not one FileObject will be passed all over again, but the method will be fed with many different fileobjects.
Comment 9 Petr Cyhelsky 2012-11-08 08:34:29 UTC
Last slowness report is from 7.0 - doesn't seem to be much of a problem now