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 227379 - Slowdown in editor
Summary: Slowdown in editor
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-12 19:03 UTC by ecerichter
Modified: 2013-07-01 15:58 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (126.98 KB, text/plain)
2013-03-12 19:04 UTC, ecerichter
Details
Video of the issue. (1.35 MB, video/avi)
2013-03-12 19:07 UTC, ecerichter
Details
Ide Snapshot as requested. (513.83 KB, application/octet-stream)
2013-03-13 12:39 UTC, ecerichter
Details
DEV 20130616: Log with the -J-Dorg.netbeans.core.NbLifecycleManager.level=FINE (240.72 KB, application/octet-stream)
2013-06-18 11:29 UTC, ecerichter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ecerichter 2013-03-12 19:03:58 UTC
Product Version = NetBeans IDE Dev (Build 201303112300)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_13
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.7-b01

Few days ago I've reported a slowdown in JS editor. Then NB team discovered a issue in Navigator window causing the intermitent slowdown.

Now, I've similar slowdown in Java editor. This is a amazing fast machine (8 cores at 3.1 Ghz), and cursor stay blinking from "busy" to "caret" while I'm typing.

I'm sure this wasn't happening in previous version, and I suppose this has been caused by some new feature in editor (breadcrumb? code folding?).

To easy the understanding of the issue I'm talking about, I'll upload a video os the session.
Comment 1 ecerichter 2013-03-12 19:04:07 UTC
Created attachment 132533 [details]
IDE log
Comment 2 ecerichter 2013-03-12 19:07:08 UTC
As the string became longer, the issue became visible - and the typewriter had to go back to correct typing (accents, for instance, won't work well when the slowdown is happening).
Comment 3 ecerichter 2013-03-12 19:07:55 UTC
Created attachment 132535 [details]
Video of the issue.
Comment 4 Dusan Balek 2013-03-13 08:24:11 UTC
Could you please create a profiler snapshot (using the 'Profile the IDE' action - Alt+Shift+Y) and attach it to the issue? Thanks.
Comment 5 ecerichter 2013-03-13 12:39:58 UTC
Created attachment 132558 [details]
Ide Snapshot as requested.
Comment 6 ecerichter 2013-03-13 12:40:21 UTC
Reopening with requested information in place.
Comment 7 Chiana 2013-04-22 14:27:11 UTC
I wonder if bug #228794 is related?
Comment 8 ecerichter 2013-04-22 14:32:05 UTC
(In reply to comment #7)
> I wonder if bug #228794 is related?

Which relation has macro expansion bug with slowdown in editor?

Regards,

Edson
Comment 9 Chiana 2013-04-22 14:36:08 UTC
I think the relation is that it took about half an hour before the navigator window updated properly, a slowdown in exxess don't you think?
Comment 10 ecerichter 2013-04-22 15:59:26 UTC
(In reply to comment #9)
> I think the relation is that it took about half an hour before the navigator
> window updated properly, a slowdown in exxess don't you think?

Hum... yes, but you have not mention the slowdown at first place, neither in original bug report.

Could you reproduce the problem? Perhaps, some misbehavior would be better "visualized" if you can record a session.

Also, record a snapshot of the IDE during the process, would give a good idea about which threads are active, and what IDE was doing behind the scenes.
Comment 11 Chiana 2013-04-22 20:55:12 UTC
Uhh... Sri about that, just have too much to do at the moment.

I've should have written some additional entry about that, but just haven't gotten to it...
Comment 12 ecerichter 2013-05-01 19:23:21 UTC
The slowdown still happen in 201304292300 DEV build.
Comment 13 David Strupl 2013-05-31 09:55:29 UTC
I think the problem is in the code in 
org.netbeans.modules.editor.java.JavaCodeTemplateProcessor.updateImports().

If this method is called frequently (user fast typing) there is always new Runnable created and posted into invokeLater queue. The longer you type fast the more Runnables are executed ... I think it should be done that if request comes and new Runnable is already scheduled to run the new one should not be added. Something like calling RequestProcessor.Task.schedule(0);
Comment 14 ecerichter 2013-06-18 11:29:27 UTC
Created attachment 135954 [details]
DEV 20130616: Log with the -J-Dorg.netbeans.core.NbLifecycleManager.level=FINE
Comment 15 ecerichter 2013-06-18 11:30:18 UTC
Comment on attachment 135954 [details]
DEV 20130616: Log with the -J-Dorg.netbeans.core.NbLifecycleManager.level=FINE

wrong ticket!
Comment 16 ecerichter 2013-06-18 11:42:11 UTC
Added a better summary after clarifying the real issue.
Comment 17 ecerichter 2013-06-18 11:43:53 UTC
(In reply to comment #16)
> Added a better summary after clarifying the real issue.

God damn it! Wrong ticket again - sorry!!!
Comment 18 Dusan Balek 2013-06-26 09:03:21 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/40b49c8b0647
Comment 19 Quality Engineering 2013-07-01 15:58:50 UTC
Integrated into 'main-silver', will be available in build *201307011244* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/40b49c8b0647
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #227379: Slowdown in editor - fixed.