Stops near you view has bad update flow and the whole page is rendered constantly. This is problematic, because the map collects thousands of route patterns and decodes thousands of geometry points from each pattern. Such computation is very expensive.
This PR introduces two fixes which mitigate the problems partly:
View navigation no longer always triggers full page render. Only when refecth stops button should appear/disapper, rendering occurs.
Polyline conversion to leaflet objects is now done in the effect which monitors relevant changes. Previously, every render cycle executed the heavy computation.
In the future, the view should be split into smaller components with sensible data dependencies. For example, map does not need re-rendering when departure times change.
Stops near you view has bad update flow and the whole page is rendered constantly. This is problematic, because the map collects thousands of route patterns and decodes thousands of geometry points from each pattern. Such computation is very expensive.
This PR introduces two fixes which mitigate the problems partly:
In the future, the view should be split into smaller components with sensible data dependencies. For example, map does not need re-rendering when departure times change.