Closed Bug 325196 Opened 19 years ago Closed 3 years ago

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

Categories

(Core :: Layout, defect)

defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: dcrossley, Unassigned)

Details

(Keywords: perf, testcase)

Attachments

(1 file)

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.
Attached file gzipped tar
Attached testcase bug-firefox-325196.tar.gz with stand-alone html page and javascript.
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
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
Closed: 19 years ago
Resolution: --- → FIXED
Unless you are sure which checkin fixed the bug, it's "WFM", not "FIXED".
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → WORKSFORME
Version: 1.8 Branch → Trunk
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 → ---
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.
(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

Hey Daniel,
Can you still reproduce this or should we close it? For me the rows remain shown all the time even after pressing hide all.

Flags: needinfo?(crazy-daniel)

Hello Andrei,
I performed a short test. The show/hide functionality still works for me.
After a short test, the speed seems to be about the same in both browsers. I think the bug can be closed.
Kind regards

Flags: needinfo?(crazy-daniel)

Marking this as Resolved > Worksforme based on the last comment.

Status: NEW → RESOLVED
Closed: 19 years ago3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: