Optimise performance of Canvas widget on Android
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 827
- Avg merge
- 15h 39m
- Merged PRs (30d)
- 40
Description
### Describe the bug
Hello toga team,
I have an app with a canvas and I draw a little circle every time the user press the canvas.
But after a large number of circles, let say 100 or 200 circles, the app begins to lag and the new circles appear after a delay and the log say that some frames have been skipped.
I made the same kind of app with android studio and there is no slow down.
Do you have an idea of the problem ?
Than you.
### Steps to reproduce
Make a canvas.
Draw a circle at each on press event
Lags appear after many circles
### Expected behavior
No slow down on redraw
### Screenshots
_No response_
### Environment
- Operating System: android
- Python version: 3.12
- Software versions:
- Briefcase:
- Toga: 0.4.8
- ...
### Logs
```
```
### Additional context
_No response_
Contributor guide
Research direction
Start by reproducing the lag on Android with a canvas that draws a circle on each press, using Toga 0.4.8 and Python 3.12. Investigate the Android Canvas widget's redraw behavior and frame-skipping logs; done means repeated presses remain responsive without delayed circles or skipped-frame warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, python
- Domain
- mobile-dev, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100