Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow world_map request leads to unresponsive front-end time #431

Open
Tracked by #455
oscgonfer opened this issue May 31, 2021 · 1 comment
Open
Tracked by #455

Slow world_map request leads to unresponsive front-end time #431

oscgonfer opened this issue May 31, 2021 · 1 comment

Comments

@oscgonfer
Copy link
Contributor

Hi,

I have noticing increasing load times for the world_map request (up to 5-10s) due to, I imagine large payloads (1,3Mb in below network trace).

image

During that time, the front-end feels unresponsive, which in some occasions feels a bit unconfortable, specially when presenting the site to others.

Just putting this here to discuss, I don't have any clear idea on how to solve it other than trying to reduce the payload for the map request and update it as the user navigates.

@pral2a
Copy link
Member

pral2a commented May 31, 2021

Yes,

That was the primary reason I started to implement the Kits last publish slider. I don't have much time right now but we'll be good to finish it soon

https://github.com/fablabbcn/smartcitizen-web/tree/feat-map-time-range-slider

That doesn't reduce the server response nor the download time but it reduces the number of markers to be created and those it reduces the load time while improves the overall navigation experience.

The primary reason the slider works well on reducing the time is the markers are not created directly in Leaflet but instead they are created as Angular objects. I found out that operation is a bit slow.

https://github.com/fablabbcn/smartcitizen-web/blob/master/src/app/core/constructors/marker/marker.constructor.js

I will suggest you give a try to the slider branch to confirm how much it improves the loading speed. I haven't test it recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants