Chrome performance analysis with long system self time

Viewed 3132

I am analysing web page performance. Web page contains one handler for "pointermove" event to change "transform: translate(x,y)" of the HTMLElement (with about 10 DOM descendents in total).

In Chrome browser, in specific conditions, "pointermove" is not handled in very performant way -- during "pointermove" there occurs delays and "choppy" changes of transform attribute.

On the contrary, in Firefox everything is performant (in these specific conditions).

In performance analysis in Chrome, I detected long "task"s during "pointermove". It says that web page JS functions (and rendering) took about 1 ms, but "System (self)" took 128 ms.

Summary tab:

Task

  • Total Time: 129.76 ms
  • Self Time: 128.19 ms

Bottom-up tab:

  • 0.6 ms 37.5 % Update Layer Tree
  • 0.3 ms 19.9 % Composite Layers
  • 0.2 ms 14.8 % Hit Test
  • 0.2 ms 13.8 % Recalculate Style

There is no explanation what task is doing and what is it? What is "System (self)" and why it took so much time? How to resolve such "choppy" behavior?

I expect performant handling of "pointermove" event, like it is in Firefox.

In Chrome, "pointermove" is handled with some long running "System (self) task", which causes bad handling and choppy feeling (delays).

Snippet / JSFiddle

code is here ↘

https://jsfiddle.net/ziom1/f8jbyz52/

1 Answers

I've had similar issue with my Notes AngularJS application that had big text inside textarea. When moving cursor it took ~600ms for System (self) in performance tab, the rest was 0 or 1ms.

Dev tools performance Tab

Browser performance pie chart

I was planing to create and issue but found this question, then wanted to report a bug to Chromium. But then I've checked how much memory the Chrome uses. I've had a lot of tabs open with a lot of heavy apps. Like multiple YouTube links, MS Teams etc. And pages hidden in groups. I've opened task manager and killed some processes/tabs that had the most mount of memory. And now my app works fine.

I may reach the limit of the browser memory. Note that I have 16GB and running Firefox on that system (with Chrome running) was not a problem.

Related