3 ms·
Probably has something to do with the fact that every movement is pushed to the browser history. Try pushing back button after you have moved the map a little.
by monkpit 6y ago
Probably has something to do with the fact that every movement is pushed to the browser history.
Try pushing back button after you have moved the map a little.
- untog 6y agoI doubt it has anything to do with that at all, that's not a performance intensive operation at all. Rendering a map, however, can be very performance intensive when done the wrong way, as I suspect it is being here.
- monkpit 6y agoI meant “something to do” as in it’s symptomatic of some repeated operation - not the direct cause.
- SahAssar 6y agoSince each pushState also creates a object reference that cannot be garbage collected as normal (every pushState includes a object to be passed to a popstate event) I don't think it's too wild to suspect slowdowns to be caused by them using pushState instead of replaceState. It could of course be thousands of other things too (and in combination), but it's not a bad place to start.