inocan-group / vue3-google-map

A set of composable components for easy use of Google Maps in your Vue 3 projects.
https://vue3-google-map.com
MIT License
264 stars 51 forks source link

add fastdom to batch reads and writes to the DOM #170

Closed halvtomat closed 9 months ago

halvtomat commented 9 months ago

Add fastdom to increase customMarker performance by batching DOM reads and writes.

Original PR #163 Closes #162

socket-security[bot] commented 9 months ago

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
fastdom 1.0.11 None +1 71.3 kB wilsonpage
halvtomat commented 9 months ago

I noticed that a new bug is introduced by this change, all markers flicker once on the dragEnd event. Have tried to find the cause of this without luck. IMO the performance is worth the small annoyance that the flicker causes but it would be best to find and remove the bug as well.

HusamElbashir commented 9 months ago

I noticed that a new bug is introduced by this change, all markers flicker once on the dragEnd event. Have tried to find the cause of this without luck. IMO the performance is worth the small annoyance that the flicker causes but it would be best to find and remove the bug as well.

It's obviously less than ideal but if you can't fix the flicker can you at least share a reproduction so we can have that documented? You can fork this sandbox and point it at your fork/branch: https://codesandbox.io/p/sandbox/confident-haze-xq7wgh?file=package.json Note that you'll need the latest from develop. @Tofandel added a prepare script so you could install directly from git.

halvtomat commented 9 months ago

Here is a reproduction of the flicker. https://codesandbox.io/p/sandbox/hardcore-pike-9dcgzn It only happens on the dragEnd event.

HusamElbashir commented 9 months ago

OK this is more noticeable than I had hoped. I'll accept the PR for now but it will have to wait for a fix before we can release it. Might have to put it behind a enableBatchMode feature flag or similar if it takes too long to fix.

HusamElbashir commented 9 months ago

Thanks for the contribution @halvtomat!