Closed Bug 345101 Opened 18 years ago Closed 18 years ago

Fix RemoveAllRanges to be faster

Categories

(Core :: DOM: Selection, defect)

1.8 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.8.1beta2

People

(Reporter: brettw, Assigned: brettw)

References

Details

(Keywords: fixed1.8.1)

In the case where there are many ranges, RemoveAllRanges is very slow (on the order of 1 second for 200 ranges). It iterates over all ranges and calls nsTypedSelection::selectFrames. This seems to be doing a lot of operations that could be faster, and is probably O(n^2). We should be able to optimize this is the case where we know all the ranges are going away.
Blocks: 345059
Whiteboard: patch in bug 345099 fixes
Assignee: selection → brettw
Fixed by bug 345099.
Status: NEW → RESOLVED
Closed: 18 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Whiteboard: patch in bug 345099 fixes
You need to log in before you can comment on or make changes to this bug.