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 12830 - Adding new components is slow
Summary: Adding new components is slow
Status: CLOSED DUPLICATE of bug 12949
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: PC Windows 3.1/NT
: P2 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on: 12949
Blocks:
  Show dependency tree
 
Reported: 2001-06-13 22:20 UTC by _ gtzabari
Modified: 2003-06-30 18:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
*.form file (69.37 KB, text/plain)
2001-06-15 21:48 UTC, _ gtzabari
Details
Program in question (29.76 KB, text/plain)
2001-06-15 21:48 UTC, _ gtzabari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2001-06-13 22:20:16 UTC
dev build 209
JDK 1.3.1

I have a form with about 30 objects. Adding new objects to the form takes 
anywhere from 3-5 seconds now.. This is bad stuff.. I think a lot of code 
optimization is in order for the form editor! :)

The machine I'm using here at work runs off 500Mhz, 196MB ram, WinNT (ugh)

CPU Usage peaks at 100% for 3 seconds everytime I modify anything in the form 
(name of variables, contents of JLabels, etc)
Comment 1 Tomas Pavek 2001-06-15 10:09:04 UTC
There seems to be no significant performance problem rising in last builds.
I've tried to add a component to a very huge form (150+ components, 2000+ lines 
of generated code) and it doesn't take more than 2 seconds, CPU not even reach 
80% usage (on 733 MHz, 384 MB RAM, W2K, JDK 1.3.0).

Anyway, this could be same problem as in issue 11441 (code genaration and 
indentation is the bottleneck). What do you have set in Options -> Form 
Objects -> Use Indentation Engine?
Comment 2 _ gtzabari 2001-06-15 13:09:51 UTC
I use the default settings but I'm also running off a 450Mhz machine with 
192MB ram and WinNT 4.0.

The result is very slow.

I took a look at IssueZilla for the forms. Aren't you planning to totally 
rewrite the form editor for 3.3 so it doesn't recreate the form-hierarchy 
everytime a component is modified? That would make a big difference :)
Comment 3 Tomas Pavek 2001-06-15 13:59:39 UTC
Not exactly - there is nothing done like "recreating the form-hierarchy", only 
all code is regenerated with each change - this takes most of the time. So no 
need to "totally rewrite the form editor", but just totally rewrite the code 
generation :).
Comment 4 _ gtzabari 2001-06-15 14:06:46 UTC
That's pretty bad just as well :) So are you planning to change this 
anytime soon?

Also, I think it might help to 'buffer' 5-10 changes at a time before 
applying them to the source-code. That might result in a "quick-fix" 
solution for now.
Comment 5 Tomas Pavek 2001-06-15 14:35:07 UTC
A complete rewrite is not planned, however some kind of change-fire buffering 
is. But I still don't think this is such critical performance problem - adding 
a component or changing a property in a "standard" form takes quite minor time 
(on my machine :), growing up to 2s in an extreme one as mentioned.

To know more details: is that so slow generally - with any form (not the 
particular one) for you? Is the "update" time dependent on form size 
significantly? (You can find a very large form in issue 11441, attachment 1121 [details].)
And please try to change the setting Options -> Form Objects -> Use Indentation 
Engine (to see the difference).
Comment 6 _ gtzabari 2001-06-15 14:46:25 UTC
Doesn't seem to be my form specifically. The forms got much slower after 
about 20 components were added. I think it's simply the number of 
components which is causes the problem.

I wish they'd let me install anything non-NT at work. It would solve 99% 
of my problems :)
Comment 7 _ gtzabari 2001-06-15 21:45:07 UTC
UPDATE: Adding new components now takes anywhere from 5-10 seconds on the same 
machine.. I think this calls for some research. I'm going to attach the program 
in question so you can play with it in the form editor on your end. Hopefully 
you'll be able to reproduce a problem.

PS: I get the longest wait closing/opening the form editor (full 10 seconds) 
and sometimes randomily get cpu loads (100%) for 3 seconds or so while browsing 
the properties of my components (not changing them)
Comment 8 _ gtzabari 2001-06-15 21:48:03 UTC
Created attachment 1604 [details]
*.form file
Comment 9 _ gtzabari 2001-06-15 21:48:31 UTC
Created attachment 1605 [details]
Program in question
Comment 10 _ gtzabari 2001-06-15 22:10:14 UTC
NOTE: The form editor seems to get slower and slower over time. Initially when 
I fire it up right after starting Netbeans it is quite responsive. Ten minutes 
into use it's extremely sluggish. I suspect a memory leak or something similar..
Comment 11 Marian Mirilovic 2001-06-18 14:20:53 UTC
Memory leak - seems to be Property Sheet problem, see issue 12949.
In my opinion, your troubles are caused by new Property Sheet, could you try
build number less than 207 ( last build without new Property Sheet)?

I played with your frame:
build 212
- adding new component - 2-3 seconds 
- changing property - 2-3 seconds 
- opening frame 11-13 seconds

the same results as on build 205.

The opening frame time is too long, but it caused by number of components, I
think.




Comment 12 _ gtzabari 2001-06-18 18:41:32 UTC
I think I found the source of the problem (which is why I uped the priority to 
P2). By clicking back and forth from one component in the form editor to 
another (not modifying anything, simply changing my focus from one component to 
another) I can get the memory usage of Netbeans to jump up from 50MB to 100MB. 
Hitting GARBAGE COLLECT using MemoryView does nothing (frees 1MB at most).

Therefore I am concluding there is a major memory leak in the form component. 
This one is pretty bad because 2 mins into use I must restart Netbeans to free 
all the memory. Otherwise the system becomes unusably slow.
Comment 13 _ gtzabari 2001-06-18 20:19:04 UTC
Doesn't seem to occur in dev build 200..
Comment 14 _ gtzabari 2001-06-19 15:22:57 UTC
Seems to be a duplicate of Issue #12949

*** This issue has been marked as a duplicate of 12949 ***
Comment 15 Quality Engineering 2003-06-30 18:21:08 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.
Comment 16 Quality Engineering 2003-06-30 18:29:24 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.