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

Summary: MavenForBinaryQueryImpl$BinResult.getRoots() might use caching to improve performance
Product: projects Reporter: Tomas Stupka <tstupka>
Component: MavenAssignee: Tomas Stupka <tstupka>
Status: RESOLVED FIXED    
Severity: normal CC: mkleint, NukemBy
Priority: P3    
Version: 8.0   
Hardware: Macintosh   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:
Attachments: <no description>

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