Closed
Bug 345050
Opened 18 years ago
Closed 18 years ago
Turning off spellchecking is very slow when there are many misspellings.
Categories
(Core :: Spelling checker, defect)
Core
Spelling checker
Tracking
()
RESOLVED
FIXED
mozilla1.8.1beta2
People
(Reporter: brettw, Assigned: brettw)
References
Details
(Keywords: fixed1.8.1, perf)
Attachments
(1 file)
138.01 KB,
text/html
|
Details |
For example, go here:
http://en.wikipedia.org/w/index.php?title=Jimi_Hendrix&action=edit
Without the patch on bug 344895, it might take many minutes to see. Then turn off spellchecking with the context menu for the textarea. It takes a noticeable amount of time.
The problem is in RemoveAllRanges() on the spellcheck selection. It iterates over all ranges and calls nsTypedSelection::selectFrames for each of them. This function is pretty scary, and is likely the cause of the slowness.
Assignee | ||
Updated•18 years ago
|
Blocks: SpellCheckPerf
Assignee | ||
Comment 1•18 years ago
|
||
This bug also causes slowness in "Add to dictionary" for large textareas. See 345059.
Updated•18 years ago
|
OS: Linux → All
Hardware: PC → All
Version: 1.8 Branch → Trunk
Comment 2•18 years ago
|
||
Overall:
Total hit count: 100899
100679 of them under nsTypedSelection::selectFrames, almost all of it under nsTextFrame::SetSelected. Almost all the time under SetSelected is under nsFrameSelection::LookUpSelection. This is called to find the details to delete, if any, as far as I can tell. The problem is that it iterates over all ranges and for each one checks whether our text frame's range intersects it.
So the net result is that RemoveAllRanges() on the selection is O(N^2) in the number of ranges. Since we have a _lot_ of ranges here, things are really slow. There's got to be a better way to do this from the selection's point of view, since it _knows_ all the ranges are being removed... If someone more familiar with this details stuff would look at this, that would be great.
Updated•18 years ago
|
Updated•18 years ago
|
Flags: blocking1.8.1? → blocking1.8.1+
Updated•18 years ago
|
Target Milestone: --- → mozilla1.8.1beta2
Assignee | ||
Updated•18 years ago
|
Assignee: mscott → brettw
Whiteboard: fixed by 345099 which has patch
Assignee | ||
Comment 3•18 years ago
|
||
Fixed by bug 345099.
Status: NEW → RESOLVED
Closed: 18 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Whiteboard: fixed by 345099 which has patch
Assignee | ||
Updated•18 years ago
|
Flags: blocking1.9a2?
You need to log in
before you can comment on or make changes to this bug.
Description
•