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 167171

Summary: System slowness when navigating through Ctrl+click
Product: apisupport Reporter: Petr Jiricka <pjiricka>
Component: ProjectAssignee: rmichalsky <rmichalsky>
Status: RESOLVED FIXED    
Severity: blocker Keywords: PERFORMANCE, RANDOM
Priority: P2    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Profiler snapshot

Description Petr Jiricka 2009-06-16 16:27:47 UTC
When navigating through Ctrl+click within the NetBeans source base, the "system slowness" notification appeared. In the
profiler dump, the biggest culprits seem to be 
1. normalizeFile() call from o.n.m.apisupport.project.universe.NetBeansOrgEntry.getSourceLocation()
2. toFileObject() call from o.n.m.apisupport.project.universe.AbstractEntryWithSources.getRunDependencies()

Attaching the profiler dump.
Comment 1 Petr Jiricka 2009-06-16 16:29:27 UTC
Created attachment 83642 [details]
Profiler snapshot
Comment 2 rmichalsky 2009-06-19 17:13:21 UTC
> 1. normalizeFile() call from o.n.m.apisupport.project.universe.NetBeansOrgEntry.getSourceLocation()
> 2. toFileObject() call from o.n.m.apisupport.project.universe.AbstractEntryWithSources.getRunDependencies()

Yep, these can be cached, thanks for pointing that out. core-main #f143bd1796da

Not sure if it solves the original situation because:
1. Although I was occasionally able to get "slowness detected" message, I got very different profiler snapshots, this
may be quite random based on system load
2. Even with given snapshot this could save approx. 15% of the time, which would not be enough (40% is spent in
findProject, I doubt it can be made significantly faster).

So please verify, if the problem persists, probably the easiest solution would be just to show waiting cursor in GoTo
action, according to issue #166789.
Comment 3 Petr Jiricka 2009-06-19 17:18:00 UTC
Great, thanks! Sorry this is hard to verify for me, as I was not getting this consistently and I don't have a
reproducible use case.
Comment 4 Quality Engineering 2009-06-20 08:09:02 UTC
Integrated into 'main-golden', will be available in build *200906200201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/f143bd1796da
User: Richard Michalsky <rmichalsky@netbeans.org>
Log: #167171: caching expensive toFileObject and normalizeFile results