Bug 8016 - REPRO: Safari hangs loading 18 MB page (deeply nested DOM tree)
Summary: REPRO: Safari hangs loading 18 MB page (deeply nested DOM tree)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P1 Normal
Assignee: mitz
URL: http://www.ronniebowman.com/guestbook...
Keywords: InRadar
: 6393 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-27 14:38 PST by Eric Seidel (no email)
Modified: 2007-04-03 06:53 PDT (History)
5 users (show)

See Also:


Attachments
Sample (446.49 KB, text/plain)
2006-03-27 14:39 PST, Eric Seidel (no email)
no flags Details
Test case (89 bytes, text/html)
2007-02-20 01:26 PST, Andrew Wellington
no flags Details
Make "<" terminate tag and attribute names (146.46 KB, patch)
2007-03-30 10:22 PDT, mitz
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2006-03-27 14:38:48 PST
Safari hangs loading large page

http://www.ronniebowman.com/guestbook.html
Comment 1 Eric Seidel (no email) 2006-03-27 14:39:11 PST
Created attachment 7341 [details]
Sample
Comment 2 Alice Liu 2006-05-16 09:48:21 PDT
<rdar://problem/4549742>
Comment 3 Darin Adler 2006-06-04 11:44:19 PDT
The problem here is that this page ends up creating a deeply nested DOM tree. So anything that's n^2 for the depth of the DOM tree ends up killing us here. The time is mostly spent in rendering code. We should see what we can do to make the rendering speed linear here. Or we could figure out why the tree ends up so deeply nested -- not sure that it does in other browsers.
Comment 4 Darin Adler 2006-06-04 11:46:17 PDT
The reason this does not hang in Firefox is that Gecko produces a relatively flat DOM tree, while we produce a deeply nested one, for this HTML. So I suppose we should consider this an HTML parser bug. Accordingly, moving to the HTML DOM component.
Comment 5 Andrew Wellington 2007-02-20 01:26:47 PST
Created attachment 13272 [details]
Test case

This piece of broken HTML from the page shows the difference between the DOM tree WebKit and Gecko generate for this bug.
Comment 6 mitz 2007-03-30 10:22:47 PDT
Created attachment 13888 [details]
Make "<" terminate tag and attribute names
Comment 7 mitz 2007-03-30 10:24:31 PDT
I think there are a couple of duplicates of this bug in bugzilla.
Comment 8 Darin Adler 2007-03-30 10:25:46 PDT
Comment on attachment 13888 [details]
Make "<" terminate tag and attribute names

r=me
Comment 9 Alexey Proskuryakov 2007-03-31 01:07:42 PDT
Committed revision 20634.

I didn't search for Bugzilla duplicates, as I don't remember any, even vaguely.
Comment 10 David Kilzer (:ddkilzer) 2007-03-31 05:01:05 PDT
(In reply to comment #9)
> I didn't search for Bugzilla duplicates, as I don't remember any, even vaguely.

Mitz, were you thinking of the missing </title> tag (Bug 3905) or missing </script> tag (Bug 9370) bugs?

Comment 11 mitz 2007-03-31 05:08:36 PDT
(In reply to comment #10)
> (In reply to comment #9)
> > I didn't search for Bugzilla duplicates, as I don't remember any, even vaguely.
> 
> Mitz, were you thinking of the missing </title> tag (Bug 3905) or missing
> </script> tag (Bug 9370) bugs?
> 

No... I recall them involving <a> tags. Maybe I'm remembering wrong :c)
Comment 12 Alexey Proskuryakov 2007-04-03 06:53:43 PDT
*** Bug 6393 has been marked as a duplicate of this bug. ***