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 154618 - 872 new violators for NetBeans startup with LimeWire project
Summary: 872 new violators for NetBeans startup with LimeWire project
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Action Items (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Stanislav Aubrecht
URL: http://wiki.netbeans.org/FitnessViaWh...
Keywords: PERFORMANCE, REGRESSION, TEST
Depends on:
Blocks:
 
Reported: 2008-12-04 15:27 UTC by Alexander Kouznetsov
Modified: 2009-02-19 23:08 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Whitelist report (67.89 KB, text/plain)
2008-12-04 15:28 UTC, Alexander Kouznetsov
Details
Screenshot (107.23 KB, image/png)
2008-12-08 10:35 UTC, Alexander Kouznetsov
Details
Stacktraces (23.79 KB, text/plain)
2008-12-09 20:42 UTC, Alexander Kouznetsov
Details

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Alexander Kouznetsov 2008-12-04 15:28:16 UTC
Created attachment 74541 [details]
Whitelist report
Comment 2 Alexander Kouznetsov 2008-12-04 15:33:50 UTC
Stacktraces are available via this link: http://spbweb.russia.sun.com/~ak153254/Performance/081201/maven.txt
Comment 3 Alexander Kouznetsov 2008-12-04 15:35:50 UTC
Please let me know about any classes among these 872 which aren't loaded due to this issue.
Comment 4 Milos Kleint 2008-12-08 07:39:33 UTC
Thank you for wasting several hours of my time when going through the list of 800+ stacktraces. They are all just one
stacktrace actually!!!!
And that one means that somehow you managed to load a maven project during your tests somewhere and the TaskList scanner
made use of it.

Either check your testcases and remove the maven project instances from the testing data, or add all the 800+ classes to
your whitelist. I don't really care. 
What I do care about is that next time you please do some initial evaluation yourself and avoid wasting my time, which
is probably more valuable than yours. Thank you.


          org.netbeans.modules.maven.NbMavenProjectImpl$LazyLookup.beforeLookup(NbMavenProjectImpl.java:680)
          org.openide.util.lookup.ProxyLookup.lookup(ProxyLookup.java:197)
         
org.netbeans.modules.projectapi.ProjectFileEncodingQueryImplementation.getEncoding(ProjectFileEncodingQueryImplementation.java:68)
          org.netbeans.api.queries.FileEncodingQuery.getEncoding(FileEncodingQuery.java:91)
          org.netbeans.modules.tasklist.todo.TodoTaskScanner.getContent(TodoTaskScanner.java:356)
          org.netbeans.modules.tasklist.todo.TodoTaskScanner.scanComments(TodoTaskScanner.java:190)
          org.netbeans.modules.tasklist.todo.TodoTaskScanner.scan(TodoTaskScanner.java:99)
          org.netbeans.modules.tasklist.impl.FileScanningWorker.scan(FileScanningWorker.java:257)
          org.netbeans.modules.tasklist.impl.FileScanningWorker.run(FileScanningWorker.java:186)
          org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:573)
          org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1005)
Comment 5 Alexander Kouznetsov 2008-12-08 10:35:06 UTC
Created attachment 74683 [details]
Screenshot
Comment 6 Alexander Kouznetsov 2008-12-08 10:43:20 UTC
I attached the screenshot of NetBeans at the end of whitelist measurements. There is only one project opened which was
not changed in the last several weeks. Is it necessary to identify that there is no maven project?

However I can see that tasklist scanning is in progress and this is probably not ok.
Comment 7 Milos Kleint 2008-12-08 10:56:39 UTC
well, the maven project can be embedded somewhere deep down in your project's sources.. like in src/sample/foo/bar/pom.xml
the a call to FileOwnerQuery will then initialize it. it doesn't matter if the project is opened or not and it shall not
matter.
Comment 8 Alexander Kouznetsov 2008-12-08 11:12:27 UTC
Thank you for the information. 

There is a pom.xml file in lime6\lib folder. I'm sorry!

In order to continue measurements of LimeWire project would it be enough to delete this file?
Comment 9 Milos Kleint 2008-12-08 12:44:09 UTC
that would be a precondition, yes.
Comment 10 Alexander Kouznetsov 2008-12-09 20:41:35 UTC
I've deleted the file and most of the violators have gone. However, there are still several maven classes:

org.netbeans.modules.maven.ModInstall
org.netbeans.modules.maven.ModInstall$OpenProjectsListener
org.netbeans.modules.maven.NbMavenProjectFactory
org.netbeans.modules.maven.NbMavenProjectImpl
org.netbeans.modules.maven.api.NbMavenProject
org.netbeans.modules.maven.hints.pom.TaskListBridge
org.netbeans.modules.maven.indexer.Installer
org.netbeans.modules.maven.profiler.MavenProjectTypeProfiler
org.netbeans.modules.maven.queries.MavenFileOwnerQueryImpl
org.netbeans.modules.maven.queries.RepositorySourceForBinaryQueryImpl

Could you please comment on them?
Comment 11 Alexander Kouznetsov 2008-12-09 20:42:14 UTC
Created attachment 74764 [details]
Stacktraces
Comment 12 Milos Kleint 2008-12-09 20:58:23 UTC
they all seem to ok to me. IMHO can be whitelisted. Usually something statically registered in default lookup or
elsewhere and used, only if a maven project is encountered, these would load more classes..
Comment 13 Alexander Kouznetsov 2008-12-22 15:52:15 UTC
Tasklist scanning discovered pom.xml file in lib subfolder of pure J2SE project which is not a Maven project. This
caused 800+ maven classes to be loaded.

Please evaluate this issue. The comment from jtulach is as following: "bug for tasklist: looks like tasklist scans wrong
project files in case there are embedded projects ".
Comment 14 Milos Kleint 2008-12-22 16:22:07 UTC
re: The comment from jtulach is as following: "bug for tasklist: looks like tasklist scans wrong
project files in case there are embedded projects ".

the behaviour is most probably correct. in case there is an embedded project, it gets loaded by FileOwnerQuery related
calls. And maven projects get recognized by presence of the pom.xml file.

IMHO a wontfix. your testcase was buggy in the sense that it didn't represent what you thought it represents (a single
j2se project) and based on your wrong input data you concluded there's something wrong in our codebase. AFAIK you fixed
that (by removing the pom.xml file from the test data)


Comment 15 Milos Kleint 2008-12-22 16:28:47 UTC
re: The comment from jtulach is as following: "bug for tasklist: looks like tasklist scans wrong
project files in case there are embedded projects ".

the behaviour is most probably correct. in case there is an embedded project, it gets loaded by FileOwnerQuery related
calls. And maven projects get recognized by presence of the pom.xml file.

IMHO a wontfix. your testcase was buggy in the sense that it didn't represent what you thought it represents (a single
j2se project) and based on your wrong input data you concluded there's something wrong in our codebase. AFAIK you fixed
that (by removing the pom.xml file from the test data)


Comment 16 Antonin Nebuzelsky 2009-01-14 15:22:34 UTC
Reassigned to the owner of tasklist. Stando, a WONTFIX as Milos suggested?
Comment 17 Stanislav Aubrecht 2009-01-14 15:34:35 UTC
tasklist certainly doesn't do anything wrong - it just came across an xml file and asked for owning project for that
file which apparently triggers some classloading

closing as suggested by mkleint