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 24932 - Splash progressbar have problems with high number of modules
Summary: Splash progressbar have problems with high number of modules
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: All All
: P4 blocker (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords: UI
Depends on:
Blocks:
 
Reported: 2002-06-19 08:56 UTC by Petr Nejedly
Modified: 2008-12-22 09:50 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Splash with bouble (18.28 KB, image/jpeg)
2002-06-19 08:57 UTC, Petr Nejedly
Details
Splash with logging (22.56 KB, text/plain)
2004-07-28 00:07 UTC, _ tboudreau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Nejedly 2002-06-19 08:56:26 UTC
I was testing scalability of module system
and with 1000 simple modules, the progress bar
went around the corner early during module list
reading and then made some nice effects (bouble
in the middle).
I'll attach the screenshot.
Comment 1 Petr Nejedly 2002-06-19 08:57:43 UTC
Created attachment 6313 [details]
Splash with bouble
Comment 2 Filip Rachunek 2002-06-19 09:04:10 UTC
The problem is that there is no way how to figure out the number of
modules before they are actually loaded. In order to prevent
displaying no progress before the modules are loaded, the progress bar
increments itself by a single point until the number of modules is known.
Of course, in case of 1000 modules it doesn't work properly. But I
don't think we should make another hack for such edge-case.
Or do you propose another solution?
Comment 3 Petr Nejedly 2002-06-19 09:23:55 UTC
One possibility is to consider reading the module list as one
operation. After that, you'll have exact number of modules
for subsequent steps.
The problem is that reading module list of 1000 modules takes 12s
on my machine and progess bar will not move during that time.

The other solution is to add an event passing a number of module files
found (ModuleList:260 - there is a perflog tick, it is possible
to replace it with regular event and pass the children.length
with the event and convert it in NbEvents. But you'll still have to
pass the number of modules later as it will be different from the
number of files.

On the other hand, I'll probably propose merging the module files
to one for faster processing so it may be a nonissue later.
Comment 4 Marek Grummich 2002-07-22 08:35:17 UTC
Target milestone was changed from '3.4' to TBD.
Comment 5 Marek Grummich 2002-07-22 08:50:30 UTC
Target milestone was changed from '3.4' to TBD.
Comment 6 Marek Grummich 2002-07-22 08:51:24 UTC
Target milestone was changed from '3.4' to TBD.
Comment 7 Marek Grummich 2002-07-22 08:57:38 UTC
Target milestone was changed from '3.4' to TBD.
Comment 8 jrojcek 2002-12-02 15:40:27 UTC
Please, reassign this issue to development team.
Comment 9 Marian Mirilovic 2002-12-06 17:58:03 UTC
reassigne to Marek, new owner of ui subcomponents
Comment 10 mslama 2004-04-19 15:04:47 UTC
Assigning to Tim
Comment 11 _ tboudreau 2004-07-25 15:51:06 UTC
-> P5 - who has 1000 modules?
Comment 12 Petr Nejedly 2004-07-26 18:25:32 UTC
Tim: it was not problem of 1000 modules, only that I found it using
1000 modules. It would be visible even for, say, 200 modules, where NB
has ~100. The problem was that there was a hardcoded magic constant
representing number of modules.

Anyway, the problem may already be gone thanks to the changes to the
module system...
Comment 13 _ tboudreau 2004-07-26 18:30:59 UTC
If we need to hardcode a magic number, maybe best to put it in a brandable bundle and 
advise to pad the number if the app is likely to have additional modules installed by the 
user.

But wait...wouldn't the line count of moduleCluster.properties + number of jars in userdir 
make a good estimate?
Comment 14 _ tboudreau 2004-07-28 00:07:44 UTC
Created attachment 16494 [details]
Splash with logging
Comment 15 _ tboudreau 2004-07-28 00:11:44 UTC
Attached is a version of the splash screen with logging.  Looking at the code for it, I can't 
figure out how you end up with something like the attached screen shot - the code is 
simply graphics.fillRect(x, y, w, h), and the only place x is assigned is on initialization.  Just 
to be sure, I tried adding code to multiply various parameters by strange numbers.

Could somebody who can reproduce the problem attach a log, preferably highlighting the 
point at which it starts to go wrong?
Comment 16 Jan Chalupa 2004-11-01 16:50:58 UTC
Re-assigning Tim's issues to Dafe.
Comment 17 David Simonek 2005-01-19 15:10:40 UTC
Passing to Martin to distribute bugs evenly. Thanks Martine :-)
Comment 18 Martin Krauskopf 2005-03-18 10:47:41 UTC
I've just tried it with cca 450 simple generated modules and that bubbling
didn't appear. It just stoped correctly at the end of the progress bar area with
description texts regularly changing. But probably we should still enhance
behaviour for such a number of modules since their number is still growing. So
this is rather enhancment.
Comment 19 _ rkubacki 2008-10-23 18:29:18 UTC
There are hundreds of modules now and the problem was fixed a long ago.