Program crashes when scrolling large canvas
- Dominant language
- Python
- Stars
- 869
- Forks
- 106
- PR merge metrics
- No merged PRs in 30d
Description
## Description
Creating a large canvas makes everything laggy. I can see from the activity monitor that drawing uses 12% of my 4/8 core processor (100% of one core) which probably means everything is being done in a single thread.
I'd like to point out that the 1800x3600 **empty** canvas lags a lot on scroll.
After scrolling for a while (with no visual feedback) the app crashes and this is the output:
```
➜ ~ flatpak run com.github.maoschanz.drawing
Gdk-Message: 14:19:48.175: Lost connection to Wayland compositor.
```
Knowing GTK and GTK development I can safely say that this is caused due to heavy computations in the same thread as your GTK app is running.
## Steps to reproduce the bug:
1. Create a 1800x3600 canvas
2. Scroll around
----
## System
- Laptop, R7 3700U @4GHz 8Gb RAM
- OS: Fedora 31, kernel 5.4.10-200
- Desktop environment: GNOME 3.34.3
- Package format (flatpak, native package, snap?): Flatpak 1.4.3
- App version: 0.4.10
Contributor guide
Research direction
Start by reproducing the issue with an empty 1800x3600 canvas and scrolling repeatedly on the affected app version. Trace the drawing and scrolling work to determine why the app loses its Wayland compositor connection; done means large canvases remain responsive during scrolling without crashing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100