umap icon indicating copy to clipboard operation
umap copied to clipboard

Wasteful initial loading of England tiles for every URL

Open jidanni opened this issue 10 months ago • 4 comments

  1. Use a very slow network.
  2. Visit e.g., https://umap.openstreetmap.fr/en/map/wilmette-il-usa-house-addressing-irregularities_961179

You will notice that actually there is a very wasteful step involved: First all the England tiles are loaded, and then the screen blanks, and the Illinois tiles are loaded.

It's sort of like first it grows its baby teeth. Then they are shed. Then it grows its final permanent teeth. How wasteful.

Voila! With this single bug report I have doubled the bandwidth of your website, saving half of your budget and allowing you to eliminate half of your new hardware purchase orders for twice as many years (whatever that means)!

Also you're not just squandering your own resources. You're also squandering those of the end users looking at the maps. They not they might not be all from First World countries with unlimited data plans and super high internet speeds. We're talking about a https://en.m.wikipedia.org/wiki/Global_North_and_Global_South problem!

jidanni avatar Apr 06 '24 09:04 jidanni

We made that suboptimal choice in https://github.com/umap-project/umap/releases/tag/2.1.3 because it's a complex issue involving many dependencies and options in the process.

I keep this issue open to give it a second chance 👍

davidbgk avatar Apr 06 '24 17:04 davidbgk

Also you're not just squandering your own resources. You're also squandering those of the end users looking at the maps. They not they might not be all from First World countries with unlimited data plans and super high internet speeds. We're talking about a https://en.m.wikipedia.org/wiki/Global_North_and_Global_South problem!

Is there a chance someday you'll create an issue here without being pedantic ? Criticism is easy. We do spend a lot of energy to make uMap, yes, better and stable, but also simple to host, light in resource, whether we talk about servers resources or client resource, and accessible to everyone.

But doing code is always much more complex than we'd often like to and we have to deal with many parameters.

Having this double map load is without doubt an issue and an annoying one, but for you information: this double load issue exists since years, but you usually would not have time to see it, but your browser do, and tried to load tiles. With this last change, that double load only occurs with some map settings, mainly when async data loading is involved. But yes it is also much more visible when it occurs.

We'll try to have a better fix, but it's not an easy one.

There is no magic: if you want to make uMap better, you can help funding it, so more people can work on it: https://liberapay.com/uMap or https://opencollective.com/uMap

yohanboniface avatar May 02 '24 12:05 yohanboniface

Workaround: include the hash in the URL when you share it, include it as iframe, etc.:

https://umap.openstreetmap.fr/en/map/wilmette-il-usa-house-addressing-irregularities_961179#14/42.0758/-87.7288

In this case, the default center will not be loaded.

yohanboniface avatar May 02 '24 13:05 yohanboniface

Other workaround: use "default center and zoom" instead of "fit all data" in default center setting:

image

yohanboniface avatar May 02 '24 13:05 yohanboniface