Chrome extension effect on page load

I'm writing a Chrome extension and I want to evaluate how it affects performance, especially I'm currently interested in how it affects page load time.

I have selected a specific page that I want to test, recorded it using Fiddler, and I use that post as an auto-reply in Fiddler. This allows me to measure download times without delaying network traffic.

Using this technique, I found out that my extension adds ~ 1200ms to load times. Now I am trying to figure out what is causing the delay and I am having trouble understanding the DevTools performance results.

First of all, there seems to be a discrepancy in the reported load times: On the one hand, the summary shows a range of ~ 13s, but on the other hand, the load event arrived after ~ 10s (which I also confirmed with performance.timing.loadEventEnd - performance.timing.navigationStart

):

Fuzzy loading times

The second thing I don't quite understand is how the number adds up (or rather, doesn't add up). For example, here's a grouping of different categories at boot time:

enter image description here

None of these columns add up to 10 or 13 seconds.

When I group by domain, I can get different lines for the extension and the rest of the file:

enter image description here

But it seems that the extension only adds 250ms, which is much lower than the difference in load times shown.

I am assuming these numbers are just CPU time and do not include latency. It's right? If so, then OK the numbers don't add up, and it is possible that the extension isn't spending all of its time working with the CPU.

Then there is also the mysterious [Chrome extension overhead] that also doesn't explain the difference in load times. Judging by the fact that this is a separate line from my extension, I thought they were mutually exclusive, but if I dive deeper into specifics, I find my extension functions under the Chrome extension * subdomain:

enter image description here

So, to summarize, I want to be able to do this:

  • Calculate the total cpu time used by my extension - it seems not enough to look under the name of the extension, and its features may appear in other groups as well.
  • Understand if the load time delay is caused by processor processing or synchronous waiting. If it is the latter, find where my extension is doing synchronous wait because I am pretty sure I have not called any blocking APIs.

Update

I eventually found out that the reason for the slowdown was that we also enabled Chrome access on every extension and that caused the slowdown dramatically. Without access, the extension had very little effect. I'm still curious though, as I could see in the profiler that my problem was accessibility. It could save a ton of time ... I'll try to look at it later.

+3


source to share





All Articles