IsraelHikingMap / Site

Israel Hiking Map has maps, route planning, and travel information for Israel. This repository holds the files needed for running the Israel Hiking Map site and apps.
https://israelhiking.osm.org.il/
Other
82 stars 33 forks source link

In case of a lot of traces the UI hangs for a bit #1980

Open zstadler opened 7 months ago

zstadler commented 7 months ago

What is the problem this feature will solve?

It takes more than 10 second for the "My Recordings" list to be ready., i.e., the spinner stops.

What is the feature you are proposing to solve the problem?

Allow the client to cache the pictures it receives from the server

What alternatives have you considered or tried?

None

Additional information

image

HarelM commented 7 months ago

The browser should cache those, shouldn't it?

zstadler commented 7 months ago

It does not look like it uses the cache.

HarelM commented 7 months ago

Might be some missing cache control headers...

zstadler commented 7 months ago

Indeed. I'm reading about the Cache-Control header and the underlying mechanism.

Stay tuned...

zstadler commented 7 months ago

Now that caching is enabled, the opening still takes a long time.

There seem to be two consecutive "batches" of thumbnail requests delayed by about 9 seconds. Until the second batch is completed, the track list does not respond to the user. The images requested of the first and second batches are identical

image

HarelM commented 7 months ago

I'll add those in the backend API definition, it won't be configurable, but it shouldn't change much. I've set it to 10 hrs for cloud saves and 1 year for recordings. I also added angular tracking of the elements in the dialog to avoid multiple rendering of images and to cause more network calls.

If you think there should be other numbers let me know before I commit and close this issue.

HarelM commented 7 months ago

I've added cache control, but the problem is in the UI when syncing the traces.

HarelM commented 7 months ago

Testing this locally shows good improvement, but I think my machine runs faster. I'll deploy this once the docker is ready so you can test if the performance improvements are enough.

github-actions[bot] commented 6 days ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days