Closed Bug 379683 Opened 18 years ago Closed 18 years ago

[FIX]Simplify the DOM the prettyprinter produces

Categories

(Core :: XML, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Attached patch Proposed fix (deleted) — Splinter Review
Patch coming up, now with the power of inline-block. With this patch, the testcase in bug 291643 uses about 80MB less memory (240MB instead of 320MB), and loads about twice as fast. The basic change is to nix the tables, so that instead of doing: <table> <tr> <td class="expander">-</td> <td> <div class="expander-content"> Stuff </div> </td> </tr> </table> with indents of kids of expander-content handled via margins on the kids we now do: <div> <div style="margin-left: -1em" class="expander">-</div> <div class="expander-content"> Stuff </div> </div> with indents of kids done via padding on expander-content. We have to toss in a 1em margin on the toplevel thing, but that's ok. The other important change is to replace all the <span class="markup"> stuff with plaintext. We don't style it anyway. ;)
Attachment #263692 - Flags: superreview?(jonas)
Attachment #263692 - Flags: review?(jonas)
Attached patch Same as diff -w (deleted) — Splinter Review
Comment on attachment 263692 [details] [diff] [review] Proposed fix Looks great. Make sure that things look good when the window is narrow enough that text wrapps, and that the monospace stylesheet looks good too (available as an alternate stylesheet in the usual place)
Attachment #263692 - Flags: superreview?(jonas)
Attachment #263692 - Flags: superreview+
Attachment #263692 - Flags: review?(jonas)
Attachment #263692 - Flags: review+
Yep. That all works. Checked in.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
Wow. I wonder if this will fix that giant xml that hung a a while back.
Would that be the giant XML I mention testing in comment 0? ;) This won't magically "fix" anything. Just make it a little faster.
Large comments don't collapse any more. I used chrome://navigator/content/tabbrowser.xml as a test.
Attached patch Fix that (deleted) — Splinter Review
Dammit, apparently I tested this _before_ twiddling those one last time. :( This patch makes sure the "expander-closed" rule hits these nodes, as well as fixing the alignment of the +/- marker with the '<' again.
Attachment #264934 - Flags: superreview?(jonas)
Attachment #264934 - Flags: review?(jonas)
Attachment #264934 - Flags: superreview?(jonas)
Attachment #264934 - Flags: superreview+
Attachment #264934 - Flags: review?(jonas)
Attachment #264934 - Flags: review+
Checked in the followup.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: