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 13460 - PERFORMANCE: calculating each charsWidth makes ide almost frozen when pasting long line(100thousands chars)
Summary: PERFORMANCE: calculating each charsWidth makes ide almost frozen when pasting...
Status: CLOSED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2001-07-10 13:42 UTC by dmladek
Modified: 2007-11-05 13:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
FTD (16.78 KB, text/plain)
2001-07-10 13:43 UTC, dmladek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dmladek 2001-07-10 13:42:48 UTC
[FFJ30CE-010709_1]
jdk1.3, rh70
====================

I was editing 2 big xml files in plain editor(not using XML editor!)
one line in one of the file was long more then 100000characters.
I needed to paste it into second file. When I done it
I thought thet ide freez.

I made a FullThreadDump and find that for each character is calculating extra
space/offset:
"AWT-EventQueue-0" prio=1 tid=0x81207c0 nid=0x4dc6 runnable [0xbe9ff000..0xbe9ff8c4]
	at sun.awt.font.FontDesignMetrics.charsWidth(FontDesignMetrics.java:279)
	at org.netbeans.editor.DrawEngine.checkTargetOffsetReached(DrawEngine.java:540)
	at org.netbeans.editor.DrawEngine.drawCurrentTokenFragment(DrawEngine.java:625)
	at org.netbeans.editor.DrawEngine.drawCurrentToken(DrawEngine.java:707)

more is in attachment
Comment 1 dmladek 2001-07-10 13:43:14 UTC
Created attachment 1837 [details]
FTD
Comment 2 Miloslav Metelka 2001-10-25 14:27:49 UTC
The viewToModel() now uses binary search to find the text offset when
the caret is positioned into text by mouse click. The fragment being
drawn is first checked whether the mouse x coordinate lies after the
end of it and if so it's ignored. Binary search is used when
searchiung inside the given fragment. This helps a lot in cases when
the fragments are long e.g. for plain text files. Clicking several
chars before end of the ~120000 chars long line took more than one
minute previously. Now it takes about one second on my machine.
Comment 3 Quality Engineering 2003-06-30 18:03:43 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.
Comment 4 Quality Engineering 2003-06-30 18:09:55 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.