feinstaub-map-v2 icon indicating copy to clipboard operation
feinstaub-map-v2 copied to clipboard

Disable wind layer when the tab is inactive

Open LuchtwachtersDelft opened this issue 3 years ago • 0 comments

The wind layer is leaking a huge amount of RAM. If you leave the website running in a tab and forget about it, the browser eventually eats several GB worth of memory.

I suggest to disable the wind layer automatically when the tab is inactive, and/or to not start the wind layer on page visit.

To detect tab activity, maybe look into the document.hidden property.

LuchtwachtersDelft avatar Oct 10 '21 20:10 LuchtwachtersDelft