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.
This may be the same bug as Bug #180375 but I'm not sure. I have two large libraries that are included in most of my projects: Doctrine and Zend. Zend code completion seems to work, but any time I use any of the Doctrine classes, the Slowness Detector pops up, the code completion never completes and cpu use hits 100% on one of the cores. It stays at 100% and gradually uses all the memory available to the Java VM. The editor, etc is still usable (technically) although terribly slow. I've had to go back to Eclipse to do any work with anything referencing Doctrine which is really depressing! I like Netbeans!! I'm currently running Netbeans Dev 201004280200 w/ Sun Java 1.6.0 18 32 bit. I've tried it with Netbeans 6.8, 6.9M1 in various combinations with Sun 32 bit and OpenJDK 64 bit. It does it on both my home and work systems. Both are running Ubuntu 10.04 64 bit. I've attached the messages.log file, although I don't know if it will help at all. --Scott
Created attachment 98643 [details] Messages.log
Created attachment 98649 [details] thread dump 1
Created attachment 98650 [details] thread dump 2
Created attachment 98651 [details] thread dump 3
A bit more information and some thread dumps: I've found I can duplicate the issue everytime doing these steps: $query = Doctrine_Query::create()->select()->from()->where(); Everything is fine up through ::create(), then cpu usage spikes and code completion stops working (td2 is just this step). Then after the $query variable is created, anytime you try to access any of its methods, code completion never gets past "please wait..." and cpu hits 100%. (td1 is this step). Combining both steps (instantiate $query and then try to add a method to $query) will spike the cpu at 100% after ::create() and then gives the Slowness Detector message on the $query->something. (td3)
Reproducable on 6.9.1 in Win Vista 32-Bit, JDK 1.6_u21, also on MacOSX and Linux. Using the Doctrine ORM (doctrine-project.org): $foo = Doctrine_Query::create() ->from('foo') ->innerJoin('bar') ->innerJoin('baz') ->andWhere('whatever') ->andWhere('yes') ->addSelect('no') ->addSelect('now it will hang') -> After about 7 successful method chainings the code completion does not work anymore and Netbeans begins to consume 100% CPU. This bug drives us nuts, our Doctrine Queries are sometimes a chain of 20 or more methods, and we have to restart Netbeans multiple times a day because of this specific bug. We think it exists since 6.8.
same here. Hope to fix in 6.9.2 or 7.0. (In reply to comment #6) > Reproducable on 6.9.1 in Win Vista 32-Bit, JDK 1.6_u21, also on MacOSX and > Linux. > > Using the Doctrine ORM (doctrine-project.org): > > $foo = Doctrine_Query::create() > ->from('foo') > ->innerJoin('bar') > ->innerJoin('baz') > ->andWhere('whatever') > ->andWhere('yes') > ->addSelect('no') > ->addSelect('now it will hang') > -> > > After about 7 successful method chainings the code completion does not work > anymore and Netbeans begins to consume 100% CPU. > > This bug drives us nuts, our Doctrine Queries are sometimes a chain of 20 or > more methods, and we have to restart Netbeans multiple times a day because of > this specific bug. > We think it exists since 6.8.
Created attachment 102748 [details] thread dump 4 (nb 6.9.1) snapshot contains waiting 20 seconds for code completion (just a frame of 20 seconds, will not complete any time soon)
The next week I plan to spent my time on the performance problem.
I can reproduce this and it seems like a bug in counting types in the chain method.
Fixed in the web-main. The fix is not hard. Probably it can be merged in the beta if it still possible. http://hg.netbeans.org/web-main/rev/d1df8e27abb4
Marian?
(In reply to comment #11) > Fixed in the web-main. The fix is not hard. Probably it can be merged in the > beta if it still possible. > > http://hg.netbeans.org/web-main/rev/d1df8e27abb4 If you can make it to the beta to be verified in beta tomorrow than I'd go for it.
@ppisl: would you run new bertram build because this one doesn't seem to be in latest build? I cannot update sources because of uncommitted changes (and I can't commit). I'd be able today that way. thanks.
Product Version: NetBeans IDE 7.0 Beta (Build 201011110000) Java: 1.6.0_20; Java HotSpot(TM) 64-Bit Server VM 16.3-b01-279 bertram build. verified based on example from user. @reporter: could you verifiy, please? @ppisl: I hope this fix is safe to be transplanted to beta.
Merged to release70_beta: http://hg.netbeans.org/releases/rev/76b46ad128e7
Thanks to Petr J. to commit it to the beta branch. To Filip: I'm not sure for 100% that it will not introduce any problem, the change is in low level util method, that is used in more case then just this one. On the other hand it's used many times in the tests, every code completion test and also other tests use it and because no test fails, it should be ok.
(In reply to comment #17) > Thanks to Petr J. to commit it to the beta branch. > > To Filip: I'm not sure for 100% that it will not introduce any problem, the > change is in low level util method, that is used in more case then just this > one. On the other hand it's used many times in the tests, every code completion > test and also other tests use it and because no test fails, it should be ok. well, it's beta, so it's time to find out if it is all ok :). thanks for committing to beta.
Created attachment 102940 [details] thread dump opened IDE and big PHP class. started profiling on autocompletion
Created attachment 102941 [details] php class I'm not sure if I should open new issue. I've downloaded the build this bug was fixed and created a big PHP class, where I've tried to do CC and it is still slow. CPU usage is about 50%. See profiler dump on previous comment and used PHP class in attachment.
(In reply to comment #20) > Created an attachment (id=102941) [details] > php class > > > I'm not sure if I should open new issue. I've downloaded the build this bug was > fixed and created a big PHP class, where I've tried to do CC and it is still > slow. CPU usage is about 50%. See profiler dump on previous comment and used > PHP class in attachment. but it's definitely better you say. Let developers evaluate your thread dump and eventually reopen this issue.
Finally had a chance to test it out. Code completion with Doctrine is quick, CPU and memory usage stays reasonable, awesome! I didn't play too much, just added Doctrine back into my library path and chained together several methods that used to cause it to die a horrible death. But it looks like it works great. Thanks so much for working on this.
Cannot verify as _completely_ "fixed": I'm still having trouble with chains about the size of 10 or more calls. The IDE won't stand still completely any more, but there are still heavy issues with the CC and its performance: - up to ~10 chain calls the completion takes up to 10 seconds (the dev. build from 11/11/2010 wants me to send bug/performance reports each time i press "space"!) - when trying to CC more than ~10 calls, CC breaks completely and does not try to find CC matches any more (but only local to the chain, outside of it the CC works as expected) reproducable: (again, using PHP Doctrine Library) $query = Doctrine_Query::create() ->from('foo') ->innerJoin('bar') ->addSelect('baz') ->andWhere('abc') /* ... repeat the above 3 lines ... */ ->{PRESS SPACE HERE}
i meant version 20101116* (daily dev build)
not only CC is slow in big files. Writing simple comment line or whatever causes CPU load about 20-30%. Of course, one shouldn't create such big files.
Strangely, I'm having none of the mentioned issues. I chained 15 Doctrine query methods together and it never had a problem. Documentation (I'm assuming you mean the /** shortcut since a standard // or /*blah*/ hits about 2% cpu) works fine for me as well. Both hit about 10 - 15% CPU usage and drop back to 0 as soon as the CC list pops up or the doc template fills out. GC continues to work and memory usage will go up and back down during the CC/doc process. I tried out the insanely large Article class and didn't have any problems with CC, although I can see that there might be a problem with the docs since it pushed cpu usage to 30% when I hit /** inside the class above one of the methods. Perhaps it's my setup. Now I'm afraid to change it and find out. :) I'm running Ubuntu 10.10 64-bit (2.6.35-22). Netbeans Dev 201011150001 Sun Java 1.6.0_22; Java HotSpot(TM) 64-Bit Server VM 17.1-b03
I'm on W7, latest java and latest IDE and have always had problems with very big files. Functions like editing, search, replace, cc and other were always slow if file is bigger than 8k lines (about 500KB)
Thought I'd be smart and install Netbeans dev on my Win 7 virtualbox. With the Article class, typing anything causes it to stop responding with 100% cpu usage, maxed out memory, and much unhappiness. Granted, my virtualbox machine doesn't have much ram allocated (512 MB), but I only managed to type // before it stopped responding completely.
Please don't mix more issues together. This is about method chain and it should be fixed. I have tested this with more then 30 calls. The other slow things should be threated separately. To apric: The described behavior is the behavior before the fix. Are you sure that you use a build with the fix. I have just try it with 30 methods in the chain and no problem.
Opened new issue #192097 for slowness in big file
Seems to be fixed in the nightlies so far. There are still some issues, but nothing regarding this specific bug. -> fixed
Yesterday also committed to thea NB 6.9 patch 3 branch
NetBeans 6.9/.1 Patch 3 has just been released. Please update your installation to get this issue fixed in your NB installation.