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

UI is getting slower when trying to find unmapped routes #1994

Closed
2 tasks done
HarelM opened this issue Apr 22, 2024 · 1 comment
Closed
2 tasks done

UI is getting slower when trying to find unmapped routes #1994

HarelM opened this issue Apr 22, 2024 · 1 comment
Assignees
Labels
bug Critical Needs to be fix ASAP

Comments

@HarelM
Copy link
Member

HarelM commented Apr 22, 2024

What happened?

When trying to find unmapped routes the app gets slower and slower until finally crashes with our of memory exception.

What steps will reproduce the bug?

  1. Go to my recordings
  2. Select a route
  3. Search for unmapped routes
  4. Waitbor heck the responsiveness of fast panning out the map

What I expect to happen

UI should be smooth

Platform

  • Israel Hiking Map app
  • Israel Hiking Map site in a browser

OS Name and Version

Any

Browser Name and Version

Chrome, latest

Additional information

Initial debug shows that the reason for this seems to be related to how the mgl-marker is getting its lngLat from, which is s method that returns a new object every time.
This might be related to a recent change in Angular or ngx-maplibre-gl as I believe this was never an issue in the past and this code wasn't changed recently.

@HarelM HarelM added the bug label Apr 22, 2024
@HarelM HarelM self-assigned this Apr 23, 2024
@HarelM HarelM added the Critical Needs to be fix ASAP label Apr 23, 2024
@HarelM HarelM added this to the Next Release milestone Apr 23, 2024
@HarelM HarelM closed this as completed in e10c2d4 Apr 23, 2024
@HarelM
Copy link
Member Author

HarelM commented Apr 23, 2024

I was not able to fully reproduce this in ngx-maplibre marker example, so it might be a bit more complicated, or requires a more complicated example.
The root of this issue is basically the creation of a lot of objects all the time, which probably causes some garbage collection backlog and this slowly degrades the performance of the website.
I look at all the other places that are using makers just in case, this is the only place that continuously created objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Critical Needs to be fix ASAP
Projects
None yet
Development

No branches or pull requests

1 participant