Bug 149557 - DiffFileEncodingQueryImpl class is loaded twice during NetBeans startup with LimeWire project
DiffFileEncodingQueryImpl class is loaded twice during NetBeans startup with ...
Status: REOPENED
Product: versioncontrol
Classification: Unclassified
Component: Code
6.x
PC Windows XP
: P4 (vote)
: 6.x
Assigned To: issues@versioncontrol
issues@versioncontrol
http://wiki.netbeans.org/FitnessViaWh...
: PERFORMANCE, TEST
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-08 20:25 UTC by Alexander Kouznetsov
Modified: 2009-02-19 23:22 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Stacktraces (4.24 KB, text/plain)
2008-10-08 20:25 UTC, Alexander Kouznetsov
Details
Stacktrace (2.11 KB, text/plain)
2008-10-14 14:37 UTC, Alexander Kouznetsov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kouznetsov 2008-10-08 20:25:30 UTC
Performance whitelist test reports that following classes are loaded during NetBeans startup with LimeWire project:

org.netbeans.modules.versioning.diff.DiffFileEncodingQueryImpl
org.netbeans.modules.versioning.util.queries.DiffFileEncodingQueryImpl

Please don't load these classes unless they are really necessary. More information about the test available via the URL
specified.

Comment from jtulach: 
Why is there similar class twice? maybe P4 or P3.
Comment 1 Alexander Kouznetsov 2008-10-08 20:25:57 UTC
Created attachment 71409 [details]
Stacktraces
Comment 2 Tomas Stupka 2008-10-09 11:08:04 UTC
> Please don't load these classes unless they are really necessary
versionig utilities exprts FileEncodingQueryImplementation. That's what DiffFileEncodingQueryImpl is for.
if DiffFileEncodingQueryImpl gets loaded it's not a cause or fault of vcs 

> Why is there similar class twice?
diff can't use the encoding query facility provided by vcs utilities as it is vcs utilitities which depends on diff ... 


Comment 3 Jaroslav Tulach 2008-10-10 12:22:36 UTC
It is not Alexander's nor performance team primary responsibility to identify whether vcs is responsible or not. We 
just identified that a class is loaded uselessly and reported bug to fix that.

Looking at the DiffFileEncodingQueryImpl, I can see that it returns null for every file having other mimetype than 
text/x-diff. This seems to me that you need to change the registration of the DiffFileEncodingQueryImpl to make the 
class activated only when encoding of such file is in question. Currently I know only about one way to achieve that: 
you can put the query into proper DataObject's getLookup.

> diff can't use the encoding query facility provided by vcs utilities as it is vcs utilitities which depends on diff
It does not sound like real argument to me. Cann't you let vcs use the diff functionality?

Comment 4 Alexander Kouznetsov 2008-10-14 14:36:20 UTC
Another similar class in the list of loaded classes during startup with LimeWire project:

org.netbeans.modules.diff.DiffFileEncodingQueryImplementation

Please don't load this class unless it is really necessary.
Comment 5 Alexander Kouznetsov 2008-10-14 14:37:01 UTC
Created attachment 71768 [details]
Stacktrace


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo