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 143052 - Startup regression: quicksearch
Summary: Startup regression: quicksearch
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Quick Search (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: David Simonek
URL: http://wiki.netbeans.org/FitnessViaWh...
Keywords: PERFORMANCE, REGRESSION, TEST
Depends on:
Blocks:
 
Reported: 2008-08-06 14:08 UTC by Alexander Kouznetsov
Modified: 2008-12-22 13:33 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stacktrace (2.44 KB, text/plain)
2008-08-06 14:09 UTC, Alexander Kouznetsov
Details
Stacktraces (33.26 KB, text/plain)
2008-08-06 14:21 UTC, Alexander Kouznetsov
Details
Stacktrace (17.18 KB, text/plain)
2008-08-06 14:23 UTC, Alexander Kouznetsov
Details
Stacktrace (4.60 KB, text/plain)
2008-08-06 15:52 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-08-06 14:08:23 UTC
Performance test reports there is a NetBeans startup regression which is caused by the loading of the following class:

org.netbeans.modules.javahelp.JavaHelpQuickSearchProviderImpl

Please don't load this class during NetBeans startup.

Comment from jtulach: "No initialization of providers before search is really done (and 
even after that only some shall be initialized)."
Comment 1 Alexander Kouznetsov 2008-08-06 14:09:06 UTC
Created attachment 66693 [details]
Stacktrace
Comment 2 Alexander Kouznetsov 2008-08-06 14:17:06 UTC
NetBeans startup regression is caused by the loading of the following classes:

org.netbeans.modules.javahelp.JavaHelpQuickSearchProviderImpl
org.netbeans.modules.jumpto.quicksearch.JavaTypeSearchProvider
org.netbeans.modules.options.QuickSearchProvider
org.netbeans.modules.options.keymap.ActionsSearchProvider
org.netbeans.modules.quicksearch.ProviderModel
org.netbeans.modules.quicksearch.ProviderModel$Category
org.netbeans.modules.quicksearch.ProviderRegistry
org.netbeans.modules.quicksearch.QuickSearchComboBar$DynamicWidthTA
org.netbeans.modules.quicksearch.recent.RecentProvider

Please don't load these classes during NetBeans startup.
Comment 3 Alexander Kouznetsov 2008-08-06 14:21:38 UTC
Created attachment 66696 [details]
Stacktraces
Comment 4 Alexander Kouznetsov 2008-08-06 14:22:52 UTC
And also the following class:

org.netbeans.spi.quicksearch.SearchProvider
Comment 5 Alexander Kouznetsov 2008-08-06 14:23:31 UTC
Created attachment 66698 [details]
Stacktrace
Comment 6 Alexander Kouznetsov 2008-08-06 15:51:23 UTC
One more class to this list:

org.netbeans.modules.quicksearch.CommandEvaluator
Comment 7 Alexander Kouznetsov 2008-08-06 15:52:40 UTC
Created attachment 66714 [details]
Stacktrace
Comment 8 David Simonek 2008-08-08 11:44:09 UTC
Hm, I18N requests and perf requests are in clash here. I18N team request leads to code that has to load display names of
all categories during first display of qsearch field (=during startup).

OK, I rewrote code to load Quick Search providers lazily when they are needed (when user types into search box).

However, UI of Quick Search is visible in main window right from start, so UI classes of Quick Search must be loaded and
used during startup, no other way here.

Fixed:
http://hg.netbeans.org/core-main/cfccf60a1305
http://hg.netbeans.org/main/cfccf60a1305 
Comment 9 Tomas Pavek 2008-08-08 13:30:47 UTC
> However, UI of Quick Search is visible in main window right from start, so UI classes
> of Quick Search must be loaded and used during startup, no other way here.

No dispute. Just note that the reported classes appeared newly - there was some change during last two weeks that 
caused that; they were not loaded before. Which ones do you think can't be avoided?
Comment 10 Quality Engineering 2008-08-09 03:42:09 UTC
Integrated into 'main-golden', available in build *200808090201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/cfccf60a1305
User: Dafe Simonek <dsimonek@netbeans.org>
Log: #143052: load provider classes more lazily, so that they are instantiated right before quick search is performed by user, not sonner
Comment 11 David Simonek 2008-08-11 12:53:02 UTC
After my fix, only org.netbeans.modules.quicksearch.ProviderModel,
org.netbeans.modules.quicksearch.ProviderModel$Category,
and CommandEvaluator are needed - they are used to obtain and store display names of categories which are used to
compute preferred width of the text box (fix of 140789)
Comment 12 Alexander Kouznetsov 2008-08-11 15:45:50 UTC
With 080811 Dev build test result I see that the following classes are gone:

org.netbeans.modules.javahelp.JavaHelpQuickSearchProviderImpl
org.netbeans.modules.jumpto.quicksearch.JavaTypeSearchProvider
org.netbeans.modules.options.QuickSearchProvider
org.netbeans.modules.options.keymap.ActionsSearchProvider
org.netbeans.modules.quicksearch.ProviderRegistry
org.netbeans.modules.quicksearch.recent.RecentProvider
org.netbeans.spi.quicksearch.SearchProvider

while the following classes are still being loaded:

org.netbeans.modules.quicksearch.CommandEvaluator
org.netbeans.modules.quicksearch.ProviderModel
org.netbeans.modules.quicksearch.ProviderModel$Category
org.netbeans.modules.quicksearch.QuickSearchComboBar$DynamicWidthTA

dsimonek, what do you think about the last one?

jtulach, do you agree to add these classes to whitelist?
Comment 13 David Simonek 2008-08-11 16:02:10 UTC
org.netbeans.modules.quicksearch.QuickSearchComboBar$DynamicWidthTA is text box itself, must be here to return
dynamically calculated preferred size
Comment 14 Jaroslav Tulach 2008-08-12 14:30:24 UTC
I think the last four classes are ok.