Skip to content

Optimization render of cluster markers #321

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

hz61p1
Copy link

@hz61p1 hz61p1 commented May 6, 2025

The error is caused by the fact that every time a marker is added or removed, the cluster render is triggered, which negatively impacts performance and may even freeze the browser tab.

This adds debounce for rendering markers in the cluster, which fixes performance issues. It may close issue #305. I'm not sure what the timeout for debounce should be, but with the current value, I haven't noticed any issues. Just in case, I added a prop for configuration.

Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addeddebounce@​2.2.01001008879100

View full report

@Donitron
Copy link

Hi there! I am currently having this exact problem with the cluster renderer triggering way too many times when the locations array gets updated. Any updates on when this is planned to be merged and released?

@hz61p1
Copy link
Author

hz61p1 commented Jun 25, 2025

Hi there! I am currently having this exact problem with the cluster renderer triggering way too many times when the locations array gets updated. Any updates on when this is planned to be merged and released?

As a temporary solution you can use my fork, we use it in production
You will only need to reinstall the package and replace vue3-google-map with vue3-google-map-fix in imports

https://www.npmjs.com/package/vue3-google-map-fix
https://github.com/hz61p1/vue3-google-map/tree/main

@Donitron
Copy link

Hi there! I am currently having this exact problem with the cluster renderer triggering way too many times when the locations array gets updated. Any updates on when this is planned to be merged and released?

As a temporary solution you can use my fork, we use it in production You will only need to reinstall the package and replace vue3-google-map with vue3-google-map-fix in imports

https://www.npmjs.com/package/vue3-google-map-fix https://github.com/hz61p1/vue3-google-map/tree/main

Awesome, it works like a charm! Thank you for the fork and for the quick reply as well

@joshkrz
Copy link

joshkrz commented Aug 7, 2025

Any idea of when this could be merged in? We're having the same issue.

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

Successfully merging this pull request may close these issues.

3 participants