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 216827 - IDE too slow for editing
Summary: IDE too slow for editing
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 7.2
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-13 20:19 UTC by bht
Modified: 2013-01-17 12:34 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
snapshot and log files in zip file (120.36 KB, application/zip)
2012-08-13 20:19 UTC, bht
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bht 2012-08-13 20:19:23 UTC
Created attachment 123064 [details]
snapshot and log files in zip file

netbeans-trunk-nightly-201208120001-windows.exe

After issue 216053 is fixed, there is still too much CPU use for normal editing. Cursor movement is delayed by 3 seconds on a 2 GHz single core CPU. Sure, this is not a fast computer. But my project is of medium size, ca 50 entities.

The attached snapshot was taken for a single paste operation over a static string variable in an entity class.

version 7.1.2 is ok.
Comment 1 Sergey Petrov 2012-08-14 11:12:26 UTC
I see cancel is ignored for 3 seconds according to log, look like I need to implement "hard" cancel logic as it may mean single user task lasts for 3 seconds here
Comment 2 bht 2012-08-15 07:15:42 UTC
Just a note.

Today after working a few hours with this build, it gets quite slow.  It does not matter whether I am editing an entity or not. The IDE cannot catch up with slow changes even if I wait. The red error stripes in the source code gutter sometimes take 30 seconds to appear. Now I get "Uncompilable source code" with COS.
Comment 3 Sergey Petrov 2012-08-15 07:30:15 UTC
if it's not only for entities it's either some memory issue, may be caused by persistence or some another issue, heap dump may help to evaluate in this case, and snapshot may be too, thread dump may help to to see if scanning thread is blocked someway.
201208150001 may be a bit better with memory usage from persistence side as it do not use new java model and try to reuse already created before. It's better to check/dump/etc with newer build.
Comment 4 Sergey Petrov 2012-08-15 08:25:15 UTC
At least for me I see some memory problems with 7.2 without any persistence usage, just nb modules and some debug/run and it cause some issues like "can't compile" and cause scanning blocking and cause constant error badges etc. there are number of oom filed already I'm looking for.
Comment 5 Quality Engineering 2012-08-18 01:34:47 UTC
Integrated into 'main-golden', will be available in build *201208180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/5098ce51a4ac
User: Sergey B. Petrov <sj-nb@netbeans.org>
Log: #216053, #216827 don't need to reparse annotation mirors as model is already created
Comment 6 bht 2012-08-19 00:10:48 UTC
May be this can help:
http://statistics.netbeans.org/analytics/exception.do?id=606726
Comment 9 Sergey Petrov 2012-08-20 09:23:21 UTC
issues #217066 and #212643 and middle report do not have assigned issue yet.
can't say which one may cause with one issue as root cause, but all may be related.
Comment 10 Sergey Petrov 2012-08-20 11:42:53 UTC
bht,
For entities edition, do you have slow edition after a long ide rest or after recent edition, on each invocation or from time to time?
How much named queries do you have in total? Fr first entity opening it's expected to have some delay as persistence model is created but it shouldn't happens later, except case if there is not enough memory (may be).
Comment 11 bht 2012-08-20 18:06:53 UTC
7.2 is always slow with this project. Just a couple of files open is enough. I have about 60 entities with perhaps 30 named queries in total. Once I opened 2 copies of the same project because I was working between 2 different versions. But one copy is slow, too. The IDE gets 800 MB Memory which it all used at some stage and the PC has 3GBytes.
Comment 12 Sergey Petrov 2012-08-21 12:08:25 UTC
60-30 shouldn't use much memory for jpa model, for me it's about 10 mb for about 300 simple entities+800 simple named queries, thanks, 
it's likely isn't the reason for latest builds but may be for 7.2.

http://hg.netbeans.org/web-main/rev/e515274a3c8c this one change should make calls to suspected slow Elements.getTyeElement from jpql validation extremely rare now, may be none calls will be made in most cases.
Comment 13 Sergey Petrov 2012-08-21 15:19:59 UTC
I still can't reproduce the issue neither with maven nor with a lot of entities/queries so have to iterate in fixing.
As snapshot for this issue contain affected calls, please try a build after mentioned above fix integration.
Comment 14 Sergey Petrov 2012-08-24 13:32:09 UTC
set as fixed for more evaluation as provided snapshot(with 4 long Element.getTypeElement) shouldn't happens any more in most cases. please reopen with new one if it's still the problem.
Also, have you tried to increase XMx? I have max heap at 390 mb with 3Gb memory if set automatically and it's not enough is I'm working with several nb modules and debug/cc etc. Usual level I have it about 300mb but jumps temporary up to 700(and back, suppose there is no memory leak) and if Xmx isn't set it may case oom, slowness etc.
Comment 15 Jiri Skrivanek 2013-01-17 12:34:40 UTC
Closing - possibly fixed because there is no other negative feedback from reporter.