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 28276 - Opening help for first time is slow
Summary: Opening help for first time is slow
Status: CLOSED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Help System (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: mslama
URL:
Keywords: PERFORMANCE
: 28277 28278 28279 34996 41999 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-10-25 18:46 UTC by _ pkuzel
Modified: 2008-12-22 18:09 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Snapshot fro OptimizeIt (313.07 KB, application/octet-stream)
2004-07-26 13:08 UTC, mslama
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ pkuzel 2002-10-25 18:46:47 UTC
It merges indexes and it takes on my PIII@600 10
seconds.
Comment 1 Jesse Glick 2002-10-25 18:54:35 UTC
*** Issue 28279 has been marked as a duplicate of this issue. ***
Comment 2 Jesse Glick 2002-10-25 18:55:11 UTC
*** Issue 28278 has been marked as a duplicate of this issue. ***
Comment 3 Jesse Glick 2002-10-25 18:57:11 UTC
*** Issue 28277 has been marked as a duplicate of this issue. ***
Comment 4 Jesse Glick 2002-10-25 19:09:11 UTC
True. However this is done entirely by JavaHelp, not NetBeans.
Comment 5 Jesse Glick 2002-11-04 14:36:52 UTC
Waiting for an owner; not part of NetBeans.
Comment 6 David Simonek 2002-12-06 17:56:48 UTC
Tim now maintains this part. I don't expect he will fix this issue,
just push and convince others outside netbeans to do something.
Comment 7 _ tboudreau 2002-12-11 02:15:34 UTC
Whom should I push?
Comment 8 David Simonek 2003-01-02 16:41:23 UTC
JavaHelp makers IMO. Don't know exact person, sorry.
Comment 9 Patrick Keegan 2003-10-16 14:17:17 UTC
I doubt the JavaHelp side is going to improve much here (certainly not
to less than one second), since a lot of data gets merged when help is
first opened. 

Could we improve things by doing the merge only once, perhaps the
first time Help is opened in the IDE, and keeping the merged help in a
file somewhere? The help system could do some sort of check the first
time the help is opened in a given session to make sure that the
installed help sets have not been changed.

One possible problem: someone manually replaces a help set jar in the
build. However, I think this is a corner case which we don't need to
optimize for. And perhaps the thing that checks the installed help
sets would be able to check the jar manifest for version number?
Comment 10 Patrick Keegan 2003-10-22 18:29:01 UTC
*** Issue 34996 has been marked as a duplicate of this issue. ***
Comment 11 Jesse Glick 2003-10-23 22:18:42 UTC
I'm not sure how or if you can premerge help sets - the JavaHelp API
permits you to merge them at runtime, but that is different from
merging them into a new static XML. I think you would need to
essentially duplicate all the logic currently in the navigators for
merging items, which would be onerous and a source of bugs (would get
out of synch with the code in JavaHelp itself).

Maybe JavaHelp just needs to be optimized better for merging (i.e.
independently of NetBeans). Ten seconds certainly doesn't sound like a
reasonable amount of time for a modern processor to spend doing
something as straightforward as collecting a bunch of IDs and
collating them.
Comment 12 Patrick Keegan 2003-11-06 16:48:40 UTC
bumping to P3, but at the same time will pursue improvement on the JH
side.
Comment 13 Marian Mirilovic 2004-07-15 15:10:45 UTC
 FYI, today's numbers :

[nb_dev](200407141800), [jdk1.5.0](beta3 - b58) on
our lab machines:
---------------------
 1st usage 	4577 	4780 	8105 	5628 	5902
 2nd usage 	264 	437 	199 	118 	155
---------------------

Test case:
- run IDE
- Push menu Help | Help Contents
EXPECTED RESULT: Help Window is opened within 1000ms
--------------

on my faster notebook / RH Linux
9/Gnome/JDK1.5.0(beta3), it takes :
~3800 ms
Comment 14 mslama 2004-07-19 17:44:02 UTC
*** Issue 41999 has been marked as a duplicate of this issue. ***
Comment 15 _ tboudreau 2004-07-23 04:41:43 UTC
IMO, file a JavaHelp bug and close this issue - not much we can do on our side, and in 
fact, opening help is *responsive* - the merging help sets dialog comes up with quickly.  

Compared to the things refactoring does, this just doesn't seem that bad.  Even not 
considering that, this is not a P2 - nobody's going to go use a different IDE because 
merging help sets takes too long.
Comment 16 Jesse Glick 2004-07-23 18:32:25 UTC
Well, for starters we need thread dumps or profiler results showing
precisely *what* is so slow when opening help, so we can know whether
the slow code is ours or JavaHelp's, and which part is slow. Otherwise
anything written in this report is just speculation.
Comment 17 mslama 2004-07-26 13:00:22 UTC
I have profiler output from OptimizeIt. Shall I attach it here? 

Summary: Work is done in AWT thread. Most of time (over 90%) is spent
in JavaHelp.showHelp() (NB code). (Next is already in JavaHelp code.)
Over 85% is spent in JHelp constructor. Most of time about 70% takes
call of JHelp.setupNavigators (includes merging; IndexView 35%,
SearchView 17%, TOCView 15%) and JHelp.updateUI() 15%.

Comment 18 mslama 2004-07-26 13:08:37 UTC
Created attachment 16442 [details]
Snapshot fro OptimizeIt
Comment 19 mslama 2004-09-27 09:37:10 UTC
Output from OptimizeIt is provided. What to do with this issue?
Comment 20 Jesse Glick 2004-09-27 09:59:08 UTC
Well, if the bulk of the time is clearly in JavaHelp code, then we
need to file a performance bug for JavaHelp itself, mention the bug #
here, and close this.
Comment 21 mslama 2004-09-27 11:57:21 UTC
Issue is filled to Bugtraq against JavaHelp as #5107351.
Comment 22 _ rkubacki 2004-09-29 15:09:08 UTC
currently marked as dup of #5107221
Comment 23 Marian Mirilovic 2005-01-25 08:17:55 UTC
verified in NB4.1(200501241900)