Closed Bug 500467 Opened 16 years ago Closed 16 years ago

[FIX]Table row reordering much slower in minefield, whether done on or off DOM

Categories

(Core :: Layout: Tables, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bugs, Assigned: bzbarsky)

References

()

Details

Attachments

(1 file)

Try clicking either sort button. Firefox 3.6a hangs and eventually gives a slow script warning. Firefox 3.5 does not have this issue.
Attached patch Proposed fixSplinter Review
So what's happening here is that the slowness is all in _removing_ the rows from the table. Every time we remove one, we try to create frames for the whitespace before/after it. This tries to do a ContentInserted on whitespace into a table-row-group, which ends up in WipeContainingBlock with us reframing the whole thing. So removing any row is O(N) in number of rows. The patch just skips trying to create frames for the whitespace if our parent expects table-related kids. If that's the case, the whitespace isn't being suppressed due to the block stuff anyway. It's being suppressed due to what the parent and siblings are, and we already handle changes to all that in MaybeRecreateContainerForFrameRemoval.
Assignee: nobody → bzbarsky
Attachment #385171 - Flags: superreview?(roc)
Attachment #385171 - Flags: review?(roc)
We could probably add a crashtest based on that testcase... roc, what do you think?
Summary: Table row reordering much slower in minefield, whether done on or off DOM → [FIX]Table row reordering much slower in minefield, whether done on or off DOM
Blocks: 495385
Blocks: 500482
Comment on attachment 385171 [details] [diff] [review] Proposed fix Looks good.
Attachment #385171 - Flags: superreview?(roc)
Attachment #385171 - Flags: superreview+
Attachment #385171 - Flags: review?(roc)
Attachment #385171 - Flags: review+
Pushed http://hg.mozilla.org/mozilla-central/rev/ac15a5ef239e Will try to create crashtest.
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: