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 251990 - MavenForBinaryQueryImpl$BinResult.getRoots() might use caching to improve performance
Summary: MavenForBinaryQueryImpl$BinResult.getRoots() might use caching to improve per...
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.0
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
: 249502 250861 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-04-22 14:02 UTC by Tomas Stupka
Modified: 2015-04-24 02:45 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
<no description> (1.65 KB, text/x-diff)
2015-04-22 14:25 UTC, Tomas Stupka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Stupka 2015-04-22 14:02:59 UTC
Product Version = NetBeans IDE Dev (Build 20150422-bcaa68246bf8)
Operating System = Mac OS X version 10.10.2 running on x86_64
Java; VM; Vendor = 1.7.0_65
Runtime = Java HotSpot(TM) 64-Bit Server VM 24.65-b04

there are reported issues when the IDE background scan spend quite some time in MavenForBinaryQueryImpl.BR.getRoots()
see issue #250833
and
https://bugzilla-attachments-250833.netbeans.org/bugzilla/attachment.cgi?id=152350

looks like the result of .getRoots() is already cached to eventually notify about changes ...
Comment 1 Tomas Stupka 2015-04-22 14:25:24 UTC
milosi - it is not clear to me why the cached field in MavenForBinaryQueryImpl.BinResults isn't also used like a return value in subsequent calls. 
Please have a look on the attached patch ...
Comment 2 Tomas Stupka 2015-04-22 14:25:54 UTC
Created attachment 153303 [details]
<no description>
Comment 3 Milos Kleint 2015-04-22 23:46:50 UTC
the patch looks generally ok I guess. I cannot think of anything why it shouldn't work.
Comment 4 Tomas Stupka 2015-04-23 09:34:32 UTC
fixed in jet-main #4d9fce9ee267
Comment 5 Tomas Stupka 2015-04-23 09:36:42 UTC
*** Bug 250861 has been marked as a duplicate of this bug. ***
Comment 6 Tomas Stupka 2015-04-23 09:37:40 UTC
*** Bug 249502 has been marked as a duplicate of this bug. ***
Comment 7 Quality Engineering 2015-04-24 02:45:39 UTC
Integrated into 'main-silver', will be available in build *201504240001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/4d9fce9ee267
User: Tomas Stupka <tstupka@netbeans.org>
Log: Issue #251990 - MavenForBinaryQueryImpl$BinResult.getRoots() might use caching to improve performance