-
Notifications
You must be signed in to change notification settings - Fork 83
Scrolling performance in matrix popup #293
Comments
On Windows XP x64 with Chrome 35 I see the jitter too. Video of the jitter: But yesterday when I tried on Chrome 34 it scrolled smoothly. So its probably just Chrome. If you updated from 34 to 35 there should be folders with older versions of Chrome still there on your computer. Might be able to test on 34. Look for old_chrome.exe. http://fixitwizkid.com/threads/google-chrome-tip-remove-old-chrome-updates-to-gain-space.8169/ |
Very nice, seeing it is much better than reading about it. Thought: I wonder if this could be related to the scroll wheel events rather than a display performance thing. If for some reasons the scroll wheel events are fired aperiodically, this would translate to the scrolling of the display. But then if so, that would be a browser issue as the extension doesn't listen to wheel event. Does this also happen on other page content? (the extension is really just that, HTML page content, and rather lightweight compared to typical web pages out there). |
On the main page scrolling is smooth. |
I brought the dev console for the extension popup ("Inspect popup"), and set a breakpoint so that if the extension code is called, it will break. But as I scrolled, the breakpoint never triggered, which means the stuttering happens on the browser side. Need to investigate more. Edit: well, if I scroll with the mouse wheel while the mouse if over the matrix rather than over the scroll bar, the stuttering is quite more noticeable. There is code in the matrix to detach/attach the hotspot widget. Looks like I need to investigate how this could be done in a more efficient way. And you are right, on Chromium 34, it is smooth, but Google Chrome 35, it sucks. Same extension code both version. |
Alright, something definitely changes between 34 and 35. It's not the scrolling in particular, it appears in 35, there is a significant performance penalty detaching/reattaching the hotspot widget, this can be seen just by moving the mouse quickly over the matrix. On 34, the hotspot widget is locked to the mouse really, while on 35 it lags significantly behind. Dammit. |
Profiling wasn't helpful. Moving the mouse non-stop over the matrix in order to trigger mouseenter/mouseleave events on the matrix cells shows that 85% of the time is spent in the browser, 10% idle, and the other few percents left is the extension javascript code. |
Dev tools > Timeline > Record > Move mouse over matrix cells Chromium 34, "Paint" is fast (2ms) because a relatively small area is redraw -- corresponding to a matrix row. Chrome 35, "Paint" is slow ( Need to investigate further later if anything can be done aside entering an issue with Chromium. Something changed in the rendering engine of the browser, and it appears to be less smart than 34, in the current case for sure. Will provide snapshots later. |
No. The line you selected is 1ms, not an issue. It's the line where there is a long green bar which are the problem. On Chromium 34, there is no such long green lines, which is the Paint oepration. On Chromium there are never as large as the ones seen in your screenshot, 510x256, they are at most one matrix row high, and often limited to a cell size horizontally: Something changed in the browser rendering engine, what you see above, repainting more than half the matrix (93ms), doesn't happen in Chromium 34. |
Why do my mouseover have the little warning sign next to it? |
I get these warning if I check the option "Capture stacks". Chromium 34 returns the same warning. So I wouldn't worry too much about these. It's the paint operation itself the problem. Somehow their dirty rectangles algorithm is different in 35, the result is always much larger than needed. I will have to file a bug and see if there is any feedback. I tried to change the CSS of the hotspots to force the region to be completely confined in the cell just to be sure, and nothing works. The fix will have to come from Chromium as far as I can tell. Profile the CPU shows that most of the time is spent browser-side, not javascript side. |
I won't be able to open an issue with Chromium until after next release. Thing is, I have to spell out the steps requried to reproduce the bug, and having to details to install HTTPSB and put it in alloww-all/block-exceptionally mode is tedious. Next release there will be a quick setup screen so that will make the explanation much easier. |
Went into the Chrome flags and messed with everything that might help. Enable this |
Yes, it works. The dirty rectangles are still too large though compared to what I see in 34, and moving the mouse over the matrix, the hotspots are not locked to the mouse pointer like they are on 34. |
What about these flags?
Are they the dirty rectangles you're talking about? I'm going to try setting them to 128. Seems a lot smoother when i move over the cells. |
Yes, definitely a difference, the largest paint ops are smaller than before, and consequently the paint time. So is that what happened? They changed the default tile size? Even 128-height results in larger tile than what I can see on 34. (The height is the one which has the most influence on performance in this case). |
Setting the tile to max size in Chromium 34 doesn't lead to the onerous paint operations. So there is something else going on here. One switch I don't see in Chromium 34 is "Delegated Renderer (AKA Übercompositor)". When I select this in Chrome 35, speed is like Chromium 34, except that the rendering quickly become corrupted, i.e. doesn't work properly. |
Same slowness on opera 24/chromium 37 If I enable #enable-compositing-for-fixed-position, scrolling is fast again(except for scroll start/stop), |
I was just about to open a issue for this. Well, I made a short video which might help somehow.
edit: and as said above, enabling edit2: Possibly more useful video comparing https://www.dropbox.com/s/jtmpnlsx0evwghs/paint_lag.webm (better quality if downloaded). |
Of interest: http://code.google.com/p/chromium/issues/detail?id=170882. Will see if removing Edit: Wow... this solves the issue as far as I can tell (testing Google Chrome 36 on Linux Mint). |
UI performance is not optimal inside the matrix popup on request heavy websites (more than 150).
Tried on the following websites:
I can reproduce the problem easily by scrolling at fixed speed. To do that, you can use the middle-click scroll (middle click inside the matrix, move your mouse a bit down to begin scrolling, watch). At some point, the scrolling will stop being smooth and start to jitter.
Chrome tasks manager shows 25% CPU usage (100% / 4cpu ?) while scrolling.
Configuration tested
Plugins usage are minimal in both cases:
The text was updated successfully, but these errors were encountered: