340 bytes, text/css
871 bytes, application/vnd.mozilla.xul+xml
1.07 KB, patch
|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
I just noticed that the problem only occurs when properties are specified for the tree row using treechildren::-moz-tree-row(X, Y, ...).
Created attachment 209374 [details] XUL file that uses the CSS This is the XUL file associated with the CSS. The important part is the vbox with id="apPeerTreeBox".
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?
Created attachment 209449 [details] Stylesheet pointing at actual image
Created attachment 209450 [details] XUL pointing to that CSS 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?
I also see zero CPU usage in Firefox 1.0.7 (release build) and Firefox 126.96.36.199 release candidate (debug build). All of this on Linux. Is this a Windows-only issue?
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.
But you do see the problem when loading from bugzilla the XUL file I attached?
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.
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...
Fwiw, this is worksforme with current trunk build on WindowsXP.
Created attachment 209585 [details] New stylesheet referencing original images 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.
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%).
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
Created attachment 209711 [details] [diff] [review] Patch to fix
Comment on attachment 209711 [details] [diff] [review] Patch to fix Replace "return" with "return rv" and r+sr=dbaron.
Created attachment 209781 [details] [diff] [review] Updated to comments
Comment on attachment 209781 [details] [diff] [review] Updated to comments I think this is worth it for the 1.8 branch.
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.
Fixed on 1.8.1 branch.
Comment on attachment 209781 [details] [diff] [review] Updated to comments approved for 1.8.0 branch, a=dveditz
Fixed for 188.8.131.52.
Marking [rft-dl] (ready for testing in Firefox 184.108.40.206 release candidates)
v.fixed on 1.8.0 branch with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:220.127.116.11) Gecko/20060308 Firefox/18.104.22.168, cpu usage normal with latest xul testcase.