Open Bug 804290 Opened 13 years ago Updated 3 years ago

Drawing table with many <img> tags is very slow

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect)

defect

Tracking

()

People

(Reporter: mz+bugzilla, Unassigned)

Details

Attachments

(3 files, 1 obsolete file)

Attached file HTML Testcase (obsolete) —
A friend of mine provide me attached testcase, I've made a quick search and didn't find corresponding bug, so creating new. In current nightly loading this testcase taking 90 seconds, IE10 loads it instantly.
Also attaching data from Gecko Profiling Addon
Isn't the problem just that it has a bunch of images that are 404 and have no width/height specified in the HTML and hence force relayout partway through the load? Note that IE doesn't handle such images correctly, in general... (You can test by replacing the spacer gifs with divs to see whether the images are the real problem, by the way.)
Component: Layout: Tables → Layout: Images
Replaced <img> tags with <div>s, loading page takes 7 seconds...
OK. Is that still significantly slower than other browsers? If so, might be worth filing a separate bug on the variant with <div>s.
(In reply to Boris Zbarsky (:bz) from comment #4) > OK. Is that still significantly slower than other browsers? Yes, IE9 loads same testcase in near one second (don't have IE10 here yet), and replacing divs with just spaces doesn't cut load time significantly, it drops from 7 to 6 seconds
If you unzip this and try it from local disk, what do the two alerts show in IE for you? In Firefox? What I see is about 800ms for the first alert and about 2s for the second in Firefox. For comparison, Chrome is at about 1500ms and hang and Opera at about 900ms and 1500ms. Note that this testcase just measures parse and layout without incremental layout going on. When I just load the page without the display:none bit I get incremental layout which obviously makes total pageload slower.
(In reply to Boris Zbarsky (:bz) from comment #6) > If you unzip this and try it from local disk, what do the two alerts show in > IE for you? In Firefox? My numbers: IE9: 1232/3889 and table is instantly drawed FF19: 875/3471 but total page load time is near 8 seconds
In IE9, you mean instantly drawn after the second alert comes up, right?
Yes
OK. Sounds like you should file a second bug in the Graphics component then, with info from about:support about your GPU and such. I can't reproduce the 4+second lag you describe; for me the paint is instant after the second alert (on Mac, though, not Windows).
Retested, there is a little confusion, when I said that total time is near 8 seconds I'm not mean that after second timer page continue to load for another four seconds, but that if I measure page load time with external clock, then in moment when second alert shows 3471, clock shows near 8 seconds, and IE's clock's time is near 4 seconds, but I found the reason for that, Profiler Addon was not disabled during tests, after it's removal new FF19 numbers are 840/1979 and complete time is near same 4 seconds as with IE, so only problem with original testcase remains.
Summary: Drawing table with many td elements is very slow → Drawing table with many nonexistent images is very slow
Finished another check, presence or absence of image in image tag doesn't matter, updating original testcase with image for consistency
Attachment #673966 - Attachment is obsolete: true
Summary: Drawing table with many nonexistent images is very slow → Drawing table with many <img> tags is very slow
Product: Core → Core Graveyard
Product: Core Graveyard → Core
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: