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 146412 - Frequent pauses when using Java editor (probably due to code completion)
Summary: Frequent pauses when using Java editor (probably due to code completion)
Status: CLOSED WORKSFORME
Alias: None
Product: ide
Classification: Unclassified
Component: Performance (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@performance
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2008-09-06 17:53 UTC by Petr Dvorak
Modified: 2011-05-25 11:38 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
thread dump 1 (16.44 KB, text/plain)
2008-09-06 17:53 UTC, Petr Dvorak
Details
thread dump 2 (14.45 KB, text/plain)
2008-09-06 17:54 UTC, Petr Dvorak
Details
thread dump 3 (21.12 KB, text/plain)
2008-09-06 17:54 UTC, Petr Dvorak
Details
thread dump 4 (waiting for CC after I pressed Ctrl+C anter '.' character) (12.78 KB, text/plain)
2008-09-06 17:55 UTC, Petr Dvorak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Dvorak 2008-09-06 17:53:03 UTC
NB: 080903
JDK: 1.6.0_07
OS: Xubuntu 8.10

I was trying to develop a simple Java application that has just a few classes (approximately 5), some simple gui (only
one main window, JFrame form) and that is using some external libraries (jlgui) on my laptop (Acer Aspire 1350 with
448MB RAM, AMD Athlon-M 2600+).

Unfortunately, I have to say that performance of 6.1's editor was much more satisfying when I tried to work with this
project compared to dev 6.5 from 03/09/2008 - the problem was the speed of invoking code completion. I frequently
received "Please wait" message that remained there for a 30+ seconds (no scanning etc. was indicated in a status bar -
project was opened for a long time, "Compile on Save" disabled). When I finally got the code completion window and
pressed backspace (no hints I saw were useful, so I tried to delete chars to extend the scope), CPU usage was 100% and I
had to wait about 1+ minute to get some response from IDE.

I captured several thread dumps from situations when IDE was hung. There is always like 15-20 seconds between them.

First three thread dumps were captured while I was waiting for IDE to unfreeze. The last thread dump was captured in a
situation when IDE was back to normal (no cpu usage, blinking caret in editor) and after I pressed Ctrl+Space in order
to invoke code completion after '.' character (then IDE was frozen again)...

I hope you will find something useful in those thread dumps.

I am assigning this a P4 priority due to obsolete hardware, but I had to go back to 6.1 as 6.5 was not usable on my
laptop...
Comment 1 Petr Dvorak 2008-09-06 17:53:53 UTC
Created attachment 69223 [details]
thread dump 1
Comment 2 Petr Dvorak 2008-09-06 17:54:07 UTC
Created attachment 69224 [details]
thread dump 2
Comment 3 Petr Dvorak 2008-09-06 17:54:21 UTC
Created attachment 69225 [details]
thread dump 3
Comment 4 Petr Dvorak 2008-09-06 17:55:00 UTC
Created attachment 69226 [details]
thread dump 4 (waiting for CC after I pressed Ctrl+C anter '.' character)
Comment 5 Vitezslav Stejskal 2008-09-08 11:39:54 UTC
Well, I'm not sure why exactly the performance degraded since 6.1. The threaddumps show activities in various parts of
the system, which all look reasonable to me.

#1 - activity in java's IsOverriddenAnnotationHandler
#2 - activity in form's ComponentInspector
#3 - activity in java's SemanticHighlighter and versioning's DiffSidebar
#4 - no activity

What IDE distro are you using (full, Java SE only, ...)? Does turning off some features (eg. java hints, tasklist, mark
occurences, ...) help?
Comment 6 Petr Dvorak 2008-09-08 13:42:40 UTC
I am using full ZIP distro's...

I am particularly surprised that dump #4 shows no activity...

I will try to investigate this issue little further, I will play with CC settings and with 6.1/6.5 versions - when I
collect some data, I will let you know. Until that time, this issue is incomplete.


[OT: I would also like to point out (it is quite unrelated to this issue) that I subjectively think a general IDE
responsiveness is worse in 6.5. For example: when I start IDE (with no projects opened) and I want to invoke a main
menu, items are slowly drawing one by one there (whole submenu of a main menu was drawn in 6.1). When I place cursor
above some item in main menu's submenu, sometimes it happens that two items in a main menu are highlighted and they
remain highlighted - I need to close a main menu and reopen it again to invoke some command from main menu, for
example... therefore I don't really know if this issue is in editor...]
Comment 7 Tomas Pavek 2009-09-10 12:18:12 UTC
This issue is quite old, incomplete for long time. Please file again if still valid in current builds.
Comment 8 Petr Dvorak 2009-12-14 05:11:35 UTC
Things much improved since the time the issue was reported (verified).