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 175842 - editor performance is too slow with large source files
Summary: editor performance is too slow with large source files
Status: RESOLVED DUPLICATE of bug 166843
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2009-10-31 09:13 UTC by aste
Modified: 2009-12-07 06:58 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
required information (1.01 MB, application/x-zip-compressed)
2009-11-09 07:00 UTC, aste
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aste 2009-10-31 09:13:56 UTC
Operation System Windows XP SP3. Processor Core2Duo 1600Mhz, 2Gb RAM
While I working with my projects, through little time after restarting NetBeans IDE there is very bad performance in
editor.. Scrooling, opening files, cursor movement is good, but after inserting or deleting each char or block of the
source text in editor occured lag (around of one second and often more) with high processor loading in this time..
This effect each time occured while editing large files (around one thousand lines and more) and some times occured
while editing small source files.
First time this defect was detected in NetBeans 6.7.  
This defect is occur in J2ME and J2SE projects.. 

In NetBeans 6.5.1 defect is absent - editing of the same files in the same projects have good performanse without lags..
Comment 1 Vitezslav Stejskal 2009-11-02 07:45:02 UTC
Could you please use Profile Me! and attach here the profiler snapshot? See the wiki for how to use Profile Me!.
http://wiki.netbeans.org/GenerateThreadDump#section-GenerateThreadDump-ProfileMeNowSinceNetBeans6.7

Thanks
Comment 2 aste 2009-11-09 07:00:42 UTC
Created attachment 90606 [details]
required information

I have some additional comments..
\
When i try make thread snapshot when "pause" in editor occured, it look like that "make snapshot" button disabled too - there is no reaction for click..

I try make few snapshots.. But i am not certain in their actuallity..
Comment 3 Vitezslav Stejskal 2009-11-09 08:23:57 UTC
Thanks for the profiler snapshots. I can see that you are using/editing j2me files. The snapshots show that there was a lot of painting done in the editor and after some analysis the clues lead to o.n.m.mobility.editor.DocumentProcessor. It has a timer, which refreshes highlights for j2me preprocessor sections after each keystroke. Although there is a 200ms delay I suspect that when not typing really fast this can easily expire making the whole editor area repaint. For large documents this could take some time and if it happens pretty much after every keystroke I may clog up the system.

I have an idea how to speed up editor repainting under certain circumstance, but if this proves fruitless we will have to change DocumentProcessor.
Comment 4 aste 2009-11-09 12:45:11 UTC
In 6.7, 6.7.1 I have same problem.. Under NetBeans 6.5.1 it work well. But version 6.5.1 has other bugs :-( (disabled toggle comment and fix imports menu items in some cindotions for example)
Only NetBeans 6.1 work properly with j2me projects...
I need migrate to other IDE? Or this bug will be fixed in 6.8?
Comment 5 aste 2009-11-21 02:25:44 UTC
(In reply to comment #3)
> Thanks for the profiler snapshots. I can see that you are using/editing j2me
> files. The snapshots show that there was a lot of painting done in the editor
> and after some analysis the clues lead to
> o.n.m.mobility.editor.DocumentProcessor. It has a timer, which refreshes
> highlights for j2me preprocessor sections after each keystroke. Although there
> is a 200ms delay I suspect that when not typing really fast this can easily
> expire making the whole editor area repaint. For large documents this could
> take some time and if it happens pretty much after every keystroke I may clog
> up the system.
> 
> I have an idea how to speed up editor repainting under certain circumstance,
> but if this proves fruitless we will have to change DocumentProcessor.

I think that you are right in this problem diagnostic. Becouse after turning off "use preprocessor" option in the project's setting i have good editor performance..

If changing documentProcessor is too hard, may be possible quick  do manual refresh for preprocessor hightlights and make possibility turn on/off automatic refresh in options menu?
Comment 6 Vitezslav Stejskal 2009-11-30 01:16:59 UTC
(In reply to comment #5)
> If changing documentProcessor is too hard, may be possible quick  do manual
> refresh for preprocessor hightlights and make possibility turn on/off automatic
> refresh in options menu?

That could be an option as well. Let's see first if we can speed up the editor without introducing another UI for switching DocumentProcessor modes.
Comment 7 aste 2009-12-02 12:21:02 UTC
I try fresh RC1.. No improvement.. New version, old problem :-(
PLEASE, DO SOMETHING WITH IT!!!
It's impossible to work with large J2ME files with turned on preprocessing option for project now!
Comment 8 Vitezslav Stejskal 2009-12-07 06:58:13 UTC

*** This bug has been marked as a duplicate of bug 166843 ***