NavigaTUM icon indicating copy to clipboard operation
NavigaTUM copied to clipboard

[Feature] improved loading times for maps

Open CommanderStorm opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. Currently our loading times for the interactive maps are a bit slow. We should look into this.

Describe the solution you'd like Either (I am ushure if those two aproaches are compatible, this would be something to try out):

WebWorkers

  • What we might want to look into some time is using WebWorkers for (pre)caching: https://docs.mapbox.com/mapbox-gl-js/api/properties/#prewarm

Static Images

  • Also, we could try some time using the Static Images API (It might be possible to use https://github.com/jperelli/osm-static-maps for a self-hosted version): https://docs.mapbox.com/help/tutorials/improve-perceived-performance-with-static/
    This is on the Backog until I upgrade my servers storage in the summer

Possible Tools:

There are a lot more similar projects (just to dump them here):

Describe alternatives you've considered Stick with the current loadingtimes, as they are, at least for the current version, enough

CommanderStorm avatar Feb 09 '22 18:02 CommanderStorm

I have some news considering this issue:

are the best combination from experimenting around a lot.

I am unsure if we should switch to static images. The main issue is that I don't like how the static images are blurry when zooming and that there appears to be no map implementation supporting both vector and static images. I don't think, that adding the complexity of another map just for this feature is worth it.

Furthermore, there seem to be some strange stuttering issues when loading new tiles. This could be because of tileserver-gl's preview, or because of some underlying issue for tileserver-gl. The best course of action is, probably, to add this as a (unofficial) deployment and see if Leaflet solves this issue.

If you (@octycs) are in the MI sometimes in the next few days, I can also show to you what I mean… I will be there because I have to work for a course's final submission 😆

I suppose at least for a better version of https://github.com/TUM-Dev/navigatum/blob/main/webclient/src/assets/logo-card.png this would be a good feature to have. 😉

I will propose a PR adding a static endpoint in the next few days, and we can look from there.

Note that again Opera Mini is https://caniuse.com/?search=WebGL => in our current version, that browser is probably not usable in terms of performance, since this means it has to use a software renderer. => We should probably finally kill our support for this stupid browser (as said before 😜)

CommanderStorm avatar Aug 12 '22 05:08 CommanderStorm

I tried prewarm, it did not improve performance (in fact it was worse) => not doing it

We switched to using a custom tileserver in #201 a while ago => are already using said performance improvemnt => lets close this issue as resolved

CommanderStorm avatar May 16 '24 14:05 CommanderStorm