hiding rows using style.display in table with thousands of rows is very slow - okay in Opera/Safari

NEW
Unassigned

Status

()

Core
Layout
--
major
12 years ago
9 years ago

People

(Reporter: David Crossley, Unassigned)

Tracking

({perf, testcase})

Trunk
perf, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

82.46 KB, application/x-tar
Details
(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20060129 Firefox/1.5
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20060129 Firefox/1.5

We have a large set of tabular data. It is displayed as an html table. There are about five thousand rows. Javascript is used to hide/show sets of rows to enable better viewing of the table. The table rows can be successully hidden using style.display="none".

The problem is that Firefox takes too long (about five minutes). The same issue is reported by a use on a non-Mac OS with a reasonably recent Firefox.

Using Opera-8.5.1 for Mac or Safari-1.3.2 there is not such issue.

See the attached test case.

Reproducible: Always

Steps to Reproduce:
1. Load supplied test-case.html
2. Select hideAll javascript link
3. Wait four minutes, answer "Continue" to the "Unresponsive script" dialog, wait another minute.

Actual Results:  
Rows are sucessfully hidden, but Firefox was too slow.

Expected Results:  
Nearly instant hiding of rows.
(Reporter)

Comment 1

12 years ago
Created attachment 210121 [details]
gzipped tar

Attached testcase bug-firefox-325196.tar.gz with stand-alone html page and javascript.

Comment 2

12 years ago
Indeed, Opera is much faster here. Is this due to extensive use of getElementById in the script? Has it become better / is it fixed in a trunk build (I seem to recall there was a related check-in)?
Component: General → Layout
Keywords: perf, testcase
OS: MacOS X → All
Product: Firefox → Core
QA Contact: general → layout
Hardware: Macintosh → All
Version: unspecified → 1.8 Branch
(Reporter)

Comment 3

12 years ago
I tried various ways, thinking that getElementById would be the most efficient. The variations seemed to have no effect on the total time. That led me to wonder if this is a layout problem.

This inital report was using yesterday's nightly release build.

I tried with today's nightly trunk build, and yes, all is well there. Sorry, i should have tried that first.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED

Comment 4

12 years ago
Unless you are sure which checkin fixed the bug, it's "WFM", not "FIXED".
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---

Updated

12 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 12 years ago12 years ago
Resolution: --- → WORKSFORME
Version: 1.8 Branch → Trunk
(Reporter)

Comment 5

12 years ago
Grrr, sorry, i used the wrong testcase. The issue is certainly improved with today's trunk (down to about 35 seconds) but still not as good as the other browsers (instantaneous). So that might get into the realm of javascript execution and efficiency. If someone can see a better way to do the javascript, then try it. Otherwise it might still be a layout issue.

Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---

Comment 6

10 years ago
This only takes 4 secs on Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b2) Gecko/2007121016 Firefox/3.0b2.  On Opera (same machine) it takes about half the time but it also doesn't work: the rows remain shown all the time.

I'm inclined to go with WORKSFORME if nobody objects.

Comment 7

9 years ago
(In reply to comment #6)
> I'm inclined to go with WORKSFORME if nobody objects.

I have to object. The testcase is still notably slower on trunk than it is in Safari or Opera (which aren't instant either). Only IE need much more time than we do.

Besides, my hardware should be better than average, so that shouldn't really be the problem.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: hiding rows using style.display in table with thousands of rows is very slow: about five minutes - okay in Opera/Safari → hiding rows using style.display in table with thousands of rows is very slow - okay in Opera/Safari
You need to log in before you can comment on or make changes to this bug.