squadmc icon indicating copy to clipboard operation
squadmc copied to clipboard

Bad performance (esp. on mobile devices)

Open Endebert opened this issue 7 years ago • 2 comments

Current version of SquadMC runs @5-10fps when mortar + target is placed and one of them is dragging:

performance_mobile

Stripping template of most vuetify components (not using v-app, removing toolbar + navigation drawer, using div instead of v-content, etc.) gets me to ~20fps, but that's still far from ideal.

If there is anyone who knows how to fix this, or in general improve performance with Vue and/or Vuetify, please let me know.

This could also be related to leaflet, as the dragging handler for a marker sets everything in motion (updates PinHolder.pos, which triggers watcher, which calculates new bearing, etc.)

Endebert avatar Jun 09 '18 17:06 Endebert

Maybe you could change the dragging handler so it fires less often?

Trikolon avatar Jun 10 '18 01:06 Trikolon

I tried and I can't really. The result is a major stutter that just happens less often. Also feels inconsistent that way. Even if I would offload the calculations into a background thread, it's the DOM update that takes so long. I think there is some kind of bug in vue or vuetify because of the multiple rerenders and updates per animation frame

Endebert avatar Jun 10 '18 13:06 Endebert