Closed
Bug 226243
Opened 22 years ago
Closed 19 years ago
Very slow loading of 2MB file with a quite big table with lots of colspans
Categories
(Core :: Layout: Tables, defect)
Core
Layout: Tables
Tracking
()
RESOLVED
FIXED
People
(Reporter: czarnowski, Unassigned)
References
(Blocks 1 open bug, )
Details
(Keywords: perf)
Attachments
(2 files, 1 obsolete file)
|
69.02 KB,
application/zip
|
Details | |
|
18.80 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031119
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031119
The indicated URL is 2 MB in size, mostly one big table. Loading it from local
drive takes more than 2 minutes. IE6 handles it in 10 seconds.
Reproducible: Always
Steps to Reproduce:
1. Download http://bazyl.rodos.com.pl/~wc/mozilla/test.zip and unpack it.
2. Open file test.htm in the browser.
3. Wait.
Actual Results:
Loading of the file completed in more than 2 minutes.
Expected Results:
Load the file in a few seconds.
Comment 2•22 years ago
|
||
It's not. Profile info coming up.
Blocks: 54542
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Hardware: PC → All
Summary: Very slow loading of 2MB file with a quite big table → Very slow loading of 2MB file with a quite big table with lots of colspans
Comment 3•22 years ago
|
||
The salient part is:
Total hit count: 29061
Count %Total Function Name
26270 90.4 nsCellMap::GetDataAt(nsTableCellMap&, int, int, int)
250 0.9 BasicTableLayoutStrategy::RowSort(int*, int*, int)
The main callers of GetDataAt are:
nsCellMap::GetEffectiveColSpan
nsCellMap::GetCellInfoAt
nsCellMap::RowIsSpannedInto
Comment 4•22 years ago
|
||
I this case, I bet the problem is that we're looping over all columns getting
celldatas... and for some columns there is no data anywhere in the table, pretty
much (the page uses colspan="5" on corresponding cells in each row). So since
the caller passes PR_TRUE for "zero-expand" we walk up each column looking for
celldata... and fail to find it, of course.
The end result is that pageload is O(N^2) in the number of table rows, since
each GetDataAt() call ends up being O(N) in the number of rows.
Is there a reason not to create the "dummy" celldatas that
nsCellMap::AdjustForZeroSpan creates to start with? It'll use a bit more
memory, but pages using 0 for rowspan or colspan are rare, and pages with very
long tables are much more common.... and I'm tired of seeing GetDataAt as the
major contributor in every single "tables are slow" profile. ;)
Comment 5•22 years ago
|
||
Maybe we should update the summary of this bug to a more
meaningful/descriptive one?
Comment 6•22 years ago
|
||
Why? It's perfectly meaningful -- the key is "lots of colpans" here. If you
notice, the summary did get updated once already...
Comment 7•22 years ago
|
||
Sorry - that comment should have gone to bug 220937
Boris could you please create a new profile now that jim nance has changed the
layout strategy and I did a few tweaks to the cellmap?
Comment 9•21 years ago
|
||
With a build pulled at "Sat Jul 17 14:00:13 CDT 2004" I have the following:
Total hit count: 27516
Count %Total Function Name
25285 91.9 nsCellMap::GetDataAt(nsTableCellMap&, int, int, int)
109 0.4 nsCellMap::GetCellInfoAt(nsTableCellMap&, int, int, int*,
int*)
82 0.3 nsStyleContext::GetStyleData(nsStyleStructID)
So RowSort has been improved...
The main callers of GetDataAt are:
17046 nsCellMap::GetEffectiveColSpan
5308 nsCellMap::GetCellInfoAt
2911 nsCellMap::RowIsSpannedInto
So doesn't look like much has changed here. :(
Attachment #135966 -
Attachment is obsolete: true
Comment 10•21 years ago
|
||
Boris could you generate a new jprof with the patch just to get an indea where
the problem is
Comment 11•21 years ago
|
||
Recent Mozilla and Firefox versions still show this bug and it's really annoying
when you have to work all day with larger tables.
It would be really nice to see a performance increase in order to work more
efficient with Firefox.
Comment 12•21 years ago
|
||
If you want to experience the slowness of large table loading on a live website,
take a look here:
http://weightweenies.starbike.com/listings/components.php?type=mtbtyres
IE6 -> about 1 s
Latest Mozilla -> 6-7 seconds, even worser when scrolling while the table is
being drawed
Comment 13•20 years ago
|
||
The url is gone.
Comment 14•20 years ago
|
||
(In reply to comment #13)
> The url is gone.
Works for me, try it again,
Comment 15•20 years ago
|
||
I was talking about the bug url ( http://bazyl.rodos.com.pl/~wc/mozilla/test.htm
), not about http://weightweenies.starbike.com/listings/components.php?type=mtbtyres
That url I can see, but the issue you're seeing might be a different issue than
what this bug is about.
I suggest you file a new bug on that and report the bug number here.
Comment 16•20 years ago
|
||
> http://weightweenies.starbike.com/listings/components.php?type=mtbtyres
> That url I can see, but the issue you're seeing might be a different issue than
> what this bug is about.
> I suggest you file a new bug on that and report the bug number here.
What do you mean by different issue?
Which component is the problem related to?
I'm still suffering from the problem, that's why I'd like to file a new bug now.
Comment 17•20 years ago
|
||
(In reply to comment #16)
> I'm still suffering from the problem, that's why I'd like to file a new bug
> now.
Pleas do file a new bug.
Comment 18•19 years ago
|
||
Original testcase is missing... but the analysis I did initially shows that bug 351942 should have fixed this.
You need to log in
before you can comment on or make changes to this bug.
Description
•