[Bug]: 1.19 - Grid rendering performance
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- java
- Domain
- frontend, performance
Research direction
Start by comparing square-grid rendering and map panning behavior between versions 1.18 and 1.19.0-alpha.1, then profile while dragging at zoom levels above and below 50% to locate the slowdown. Done when panning with a visible square grid is smooth at typical zoom levels; the issue names no source files or tests.
Written by the indexing model from the issue text.
Description
Describe the Bug
I mainly use MT with square grids. On 1.18, I could smoothly interact with MT (e.g., by panning the map) while the grid is displayed. On 1.19, the map moves sluggishly when panned, making it difficult to look at.
If I zoom out to <50%, then performance is okay.
To Reproduce
- Open MT
- Make a map with a square grid type
- Show the grid.
- Drag to pan the map.
Expected Behaviour
The map should pan smoothly in response to user interaction.
Screenshots
No response
MapTool Info
1.19.0-alpha.1
Desktop
Linux Mint 22.3
Additional Context
For comparison, I did some timings on a blank map with only a solid background color and the grid being rendered at 100% zoom. On both versions, I hacked the timer thresholds to 0 so we can see everything, and grabbed a representative frame.
On 1.18.8:
Timer ZoneRenderer.renderZone (34 elements)
0. 4 ms <root>
1. 4 ms paintComponent
2. 0 ms paintComponent:allocateBuffer
3. 0 ms update
4. 0 ms setup
5. 0 ms calcs-1
6. 0 ms ZoneRenderer-getVisibleArea
7. 0 ms createTransformedArea
8. 2 ms board
9. 0 ms drawableBackground
10. 0 ms drawableObjects
11. 0 ms grid
12. 0 ms renderLights
13. 0 ms renderLumensOverlay
14. 0 ms renderAuras
15. 0 ms drawableTokens
16. 0 ms drawableGM
17. 0 ms unowned movement
18. 0 ms labels-1
19. 0 ms renderFog
20. 0 ms owned movement
21. 0 ms token name/labels
22. 0 ms renderVisionOverlay
23. 0 ms overlays
24. 0 ms overlays: PointerOverlay
25. 0 ms renderCoordinates
26. 0 ms lightSourceIconOverlay.paintOverlay
27. 0 ms RenderHelper-createContext
28. 0 ms RenderHelper-doRender
29. 0 ms RenderHelper-useAA
30. 0 ms RenderHelper-setTransform
31. 0 ms RenderHelper-render
32. 0 ms RenderHelper-disposeContext
33. 2 ms paintComponent:renderBuffer
And on 1.19.0-alpha.1
Timer ZoneRenderer.renderZone (34 elements)
0. 20387 μs <root>
1. 20383 μs paintComponent
2. 2 μs paintComponent:allocateBuffer
3. 61 μs update
4. 4 μs setup
5. 2 μs calcs-1
6. 0 μs ZoneRenderer-getVisibleArea
7. 1 μs createTransformedArea
8. 2056 μs board
9. 10 μs drawableBackground
10. 0 μs drawableObjects
11. 16599 μs grid
12. 10 μs LightsRenderer-renderLights
13. 0 μs LumensRenderer-renderLumensOverlay
14. 4 μs LightsRenderer-renderAuras
15. 3 μs drawableTokens
16. 0 μs drawableGM
17. 4 μs unowned movement
18. 30 μs labels-1
19. 0 μs FogRenderer-renderFog
20. 0 μs owned movement
21. 1 μs token name/labels
22. 0 μs VisionOverlayRenderer-renderVisionOverlay
23. 15 μs overlays
24. 2 μs overlays: PointerOverlay
25. 0 μs renderCoordinates
26. 0 μs lightSourceIconOverlay.paintOverlay
27. 0 μs DebugRenderer-createContext
28. 20 μs DebugRenderer-doRender
29. 1 μs DebugRenderer-useAA
30. 4 μs DebugRenderer-setTransform
31. 14 μs DebugRenderer-render
32. 0 μs DebugRenderer-disposeContext
33. 1485 μs paintComponent:renderBuffer
- Dominant language
- Java
- Stars
- 927
- Forks
- 286
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 94
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
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.
More from RPTools/maptool
-
[Bug]: An initiative list with no current entry logs an error on every changePossibly taken @dwizard0 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
[Maintenance]: Migrate gradle dependency submission to modern alternativePossibly taken @VelpulaGangavardhan claimed this 18 days ago. Opencode-maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
RPTools/maptool#6156 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
code-maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
Similar issues
-
Cleanup: restore the interrupt flag in AiFailureAnalyzerPossibly taken @Rishankgupta08 claimed this today. Opengood first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
seleniumboot/selenium-boot#258 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
johanhaleby/occurrent#1505 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
FasterXML/jackson-databind#6443 ·
Maintainers usually reply within 1 day
-
Docs: 2 broken linksOpen
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day