Closed
Bug 323028
Opened 19 years ago
Closed 19 years ago
[FIX]Using background-image CSS style for treechildren::-moz-tree-row causes excessive CPU load
Categories
(Core :: XUL, defect, P1)
Core
XUL
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: matthew.gertner, Assigned: bzbarsky)
References
Details
(4 keywords, Whiteboard: [rft-dl])
Attachments
(3 files, 6 obsolete files)
340 bytes,
text/css
|
Details | |
871 bytes,
application/vnd.mozilla.xul+xml
|
Details | |
1.07 KB,
patch
|
dbaron
:
approval-branch-1.8.1+
dveditz
:
approval1.8.0.2+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 We are using PNG images as background for a XUL tree using the background-image style attached to treechildren::-moz-tree-row. When the tree is visible, CPU usage immediately goes to 100%. I don't think that the specific images are the problem since I tried converting them to GIFs, changing the size, etc. and the problem persists. Reproducible: Always
Reporter | ||
Comment 1•19 years ago
|
||
I just noticed that the problem only occurs when properties are specified for the tree row using treechildren::-moz-tree-row(X, Y, ...).
Reporter | ||
Comment 2•19 years ago
|
||
Assignee: dbaron → Jan.Varga
Component: Style System (CSS) → XP Toolkit/Widgets: Trees
QA Contact: ian → xptoolkit.trees
Reporter | ||
Comment 3•19 years ago
|
||
This is the XUL file associated with the CSS. The important part is the vbox with id="apPeerTreeBox".
Assignee | ||
Comment 4•19 years ago
|
||
So.. I linked to that CSS file from that XUL, changed the images in the CSS file to https://www.mozilla.org/images/header_logo.gif and there was no CPU usage at all. I suspect at least part of this is that there are no treerows in that XUL... What's a XUL file that actually _does_ show the problem?
Reporter | ||
Comment 5•19 years ago
|
||
Here's a new XUL file that reproduces the bug without the need for additional JavaScript. Obviously the path to the CSS must be tweaked. The problem is definitely linked to the properties of the tree rows. If I set properties for just one row, there is no problem. If I set "checked leaf" for both there is also no problem. It is only when I set one to "checked leaf" and the other to "unchecked leaf" that the process goes to 100%.
Reporter | ||
Updated•19 years ago
|
Attachment #209374 -
Attachment is obsolete: true
Assignee | ||
Comment 6•19 years ago
|
||
Attachment #208192 -
Attachment is obsolete: true
Assignee | ||
Comment 7•19 years ago
|
||
Matthew, with this testcase (which points to the CSS, which points to the bugzilla image), I see zero CPU usage in a current trunk seamonkey build. Do you see the CPU problem with it in a trunk build?
Attachment #209433 -
Attachment is obsolete: true
Assignee | ||
Comment 8•19 years ago
|
||
I also see zero CPU usage in Firefox 1.0.7 (release build) and Firefox 1.5.0.1 release candidate (debug build). All of this on Linux. Is this a Windows-only issue?
Reporter | ||
Comment 9•19 years ago
|
||
If you aren't seeing the symptoms under Linux, it's very possible this is a Windows-only issue. I've only tested on Windows with the 1.8 branch.
Assignee | ||
Comment 10•19 years ago
|
||
But you do see the problem when loading from bugzilla the XUL file I attached?
Reporter | ||
Comment 11•19 years ago
|
||
Yes, but only when I select the first row in the tree. Not sure what's going on since I didn't need to do that in the original example, but I assume it's the same problem and this should enable you to reproduce it.
Assignee | ||
Comment 12•19 years ago
|
||
Hmm.... That worksforme too. :( Do you have a build with symbols you could test in a debugger, by chance? If so, just breaking randomly and seeing where you are in the code would help...
Comment 13•19 years ago
|
||
Fwiw, this is worksforme with current trunk build on WindowsXP.
Reporter | ||
Comment 14•19 years ago
|
||
I think the problem may be somehow linked to the actual images we are using, so I'm uploading a new stylesheet that references them instead of the images used by Boris.
Attachment #209449 -
Attachment is obsolete: true
Reporter | ||
Comment 15•19 years ago
|
||
Reporter | ||
Updated•19 years ago
|
Attachment #209450 -
Attachment is obsolete: true
Reporter | ||
Comment 16•19 years ago
|
||
Try the latest XUL file. I get the problem on both my official release and debug version of FF 1.5 on Windows XP (CPU immediately goes to 100%).
Comment 17•19 years ago
|
||
With the latest XUL file, I can see the 100% cpu. I've made a modified testcase here (I can't seem to use data uri inside ::-moz-tree-row selector?): http://wargers.org/mozilla/bug323028/323028_excessive_cpu.xul Here I have a backtrace with a breakpoint in nsTreeSelection::InvalidateSelection: http://wargers.org/mozilla/bug323028/bt_323028.txt This regressed between 2004-09-20 and 2004-09-21: http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2004-09-20+06%3A00%3A00&maxdate=2004-09-21+10%3A00%3A00&cvsroot=%2Fcvsroot
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking1.9a1?
Flags: blocking1.8.1?
Keywords: regression,
testcase
Assignee | ||
Comment 19•19 years ago
|
||
Assignee: Jan.Varga → bzbarsky
Status: NEW → ASSIGNED
Attachment #209711 -
Flags: superreview?(dbaron)
Attachment #209711 -
Flags: review?(dbaron)
Assignee | ||
Updated•19 years ago
|
OS: Windows XP → All
Priority: -- → P1
Hardware: PC → All
Summary: Using background-image CSS style for treechildren::-moz-tree-row causes excessive CPU load → [FIX]Using background-image CSS style for treechildren::-moz-tree-row causes excessive CPU load
Target Milestone: --- → mozilla1.9alpha
Comment on attachment 209711 [details] [diff] [review] Patch to fix Replace "return" with "return rv" and r+sr=dbaron.
Attachment #209711 -
Flags: superreview?(dbaron)
Attachment #209711 -
Flags: superreview+
Attachment #209711 -
Flags: review?(dbaron)
Attachment #209711 -
Flags: review+
Assignee | ||
Comment 21•19 years ago
|
||
Attachment #209711 -
Attachment is obsolete: true
Assignee | ||
Comment 22•19 years ago
|
||
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 23•19 years ago
|
||
Comment on attachment 209781 [details] [diff] [review] Updated to comments I think this is worth it for the 1.8 branch.
Attachment #209781 -
Flags: approval1.8.1?
Assignee | ||
Updated•19 years ago
|
Flags: blocking1.9a1?
Updated•19 years ago
|
Attachment #209781 -
Flags: approval1.8.1? → branch-1.8.1?(dbaron)
Assignee | ||
Comment 24•19 years ago
|
||
Comment on attachment 209781 [details] [diff] [review] Updated to comments It's likely worth it to take this on the 1.8.0 branch too. This is a very safe fix that just reverts to the behavior this code had in 1.7.
Attachment #209781 -
Flags: approval1.8.0.2?
Attachment #209781 -
Flags: branch-1.8.1?(dbaron) → branch-1.8.1+
Updated•18 years ago
|
Flags: blocking1.8.0.2+
Comment 26•18 years ago
|
||
Comment on attachment 209781 [details] [diff] [review] Updated to comments approved for 1.8.0 branch, a=dveditz
Attachment #209781 -
Flags: approval1.8.0.2? → approval1.8.0.2+
Comment 28•18 years ago
|
||
Marking [rft-dl] (ready for testing in Firefox 1.5.0.2 release candidates)
Whiteboard: [rft-dl]
Comment 29•18 years ago
|
||
v.fixed on 1.8.0 branch with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2, cpu usage normal with latest xul testcase.
Keywords: fixed1.8.0.2 → verified1.8.0.2
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: xptoolkit.trees → xptoolkit.widgets
You need to log in
before you can comment on or make changes to this bug.
Description
•