boomerang icon indicating copy to clipboard operation
boomerang copied to clipboard

Performance Audit 2017: Unload beacon size

Open nicjansma opened this issue 7 years ago • 5 comments

We should investigate if we want all of the data we have on the unload beacon.

For comparison:

  • Page Load beacon, 1.530.0, all plugins enabled, blank page, Chrome: 1,876 bytes
  • Unload beacon, 1.530.0, all plugins enabled, blank page, Chrome: 1,389 bytes

That's only 487 bytes less on the unload beacon. We might want to skip things like the nt_* timestamps, which would've been part of the load beacon, and don't add much value to the unload beacon.

nicjansma avatar Dec 22 '17 15:12 nicjansma

we should first add NavigationTiming compression to reduce the size of both beacons.

bluesmoon avatar Dec 22 '17 15:12 bluesmoon

I also think we should have a better system for removing data once it has been beaconed. I like how the User Timing API plugin has a mechanism to ensure that data sent on load is not also sent on unload.

Presumably, there are some cases where you may still want that data. I think it would be helpful if we exposed an easier method to remove data once it is beaconed.

tollmanz avatar Dec 22 '17 15:12 tollmanz

Good point @tollmanz . We'll soon backport an optional flag to addVar() that adds data to just the next beacon automatically, instead of having the plugin have to listen and remove the data after the next beacon.

nicjansma avatar Feb 07 '18 20:02 nicjansma

Hello @bluesmoon

Do you think that as a good starting point about "NavigationTiming compression" we can use offsets for NavigationTiming values and then convert the results to base36?

ceckoslab avatar Sep 10 '19 13:09 ceckoslab

Perhaps start by using NavigationTiming2 which already has values as offsets. Only if not supported you can fallback to NT1 and calculate offsets.

bluesmoon avatar Sep 13 '19 17:09 bluesmoon