HSLdevcom / HSLdevcom/digitransit-ui

Realtime animation is pretty heavy

Open
#1,472 1 comment 1 reaction 0 assignees View on GitHub

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?
    screen shot 2017-03-14 at 12 53 36

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.