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 180620 - Code formatting is extremely slow
Summary: Code formatting is extremely slow
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 normal (vote)
Assignee: Anton Chechel
URL:
Keywords:
: 177284 (view as bug list)
Depends on: 150197 181436
Blocks: 173487
  Show dependency tree
 
Reported: 2010-02-11 09:29 UTC by Andrei Chistiakov
Modified: 2010-03-12 07:03 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot (120.67 KB, image/png)
2010-02-11 09:29 UTC, Andrei Chistiakov
Details
Thread Dump (57.13 KB, text/plain)
2010-02-18 04:44 UTC, Alexandr Scherbatiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Chistiakov 2010-02-11 09:29:04 UTC
Created attachment 94094 [details]
Screenshot

Product Version: NetBeans IDE Dev (Build 201002110200)
Java: 1.6.0_16; Java HotSpot(TM) Client VM 14.2-b01
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)

To reproduce:
- create WeatherFXApplication sample
- open Weather.fx in editor
- invoke Format popup menu command on source

On Sun Ultra 20 (2.4 GHz Dual Core Opteron, 3GB RAM) it takes 1 min 8 sec to complete the operation. While it's in progress, IDE doesn't respond. See attached screenshot.
Comment 1 Anton Chechel 2010-02-17 07:05:47 UTC
*** Bug 177284 has been marked as a duplicate of this bug. ***
Comment 2 Alexandr Scherbatiy 2010-02-18 04:40:26 UTC
IDE Screenshot
https://netbeans.org/bugzilla/attachment.cgi?id=91414
Comment 3 Alexandr Scherbatiy 2010-02-18 04:43:44 UTC
I use the NetBeans-JavaFX-Soma: #157 and the IDE hangs in this case.
Comment 4 Alexandr Scherbatiy 2010-02-18 04:44:12 UTC
Created attachment 94281 [details]
Thread Dump
Comment 5 Anton Chechel 2010-03-02 09:35:20 UTC
The problem is in our slow lexer which is been invoked after every small modification of document.

It is fixed for now but there are 2 related issues left:
1. http://netbeans.org/bugzilla/show_bug.cgi?id=181436 If user has assertions enabled then he can experience assertion error during reformatting. Should be fixed in netbeans editor soon.
2. https://netbeans.org/bugzilla/show_bug.cgi?id=150197 There is still problem with performance if user invoke undo after big reformat. Should be fixed soon as well.

http://hg.netbeans.org/javafx/rev/d714068aeb3f
Comment 6 Alexandr Scherbatiy 2010-03-12 07:03:06 UTC
verified in NetBeans-JavaFX-Soma: #182