HSLdevcom / HSLdevcom/digitransit-ui
Realtime animation is pretty heavy
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 267
- Forks
- 145
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 75
Description
Realtime animations are uses a lot of CPU (linjat/../pysakit/) and would easily drain the battery on a phone. I read about the subject and SVG should not be used for animations, instead this should be done drawing on a canvas.
I read about a possible change, but it was a lot of work: sprite-animation
or we could use a library for these animations.
So I would ask for your opinion, should we
- change animation
- use library
- disable for devices, eventually those with low battery
- other?

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the realtime animation code under linjat/../pysakit/ and profiling its CPU use, especially on a phone. Review the linked canvas sprite-animation article and compare the current SVG approach with the proposed alternatives. Done requires an agreed direction and evidence that the chosen approach reduces CPU and battery impact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100