boomerang
boomerang copied to clipboard
Performance Audit 2017: Unload beacon size
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.
we should first add NavigationTiming compression to reduce the size of both beacons.
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.
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.
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?
Perhaps start by using NavigationTiming2 which already has values as offsets. Only if not supported you can fallback to NT1 and calculate offsets.