Optimization fixed.
The biggest problem was more severe than expected: while dragging a Rectangle or Ellipse Selection, LinXPaint was rebuilding a document-sized selection mask on every mouse movement. Marching ants then scanned that full mask, and antialiased selection could create a 4× supersampled canvas-sized mask. On an 8K image, simply moving the mouse could therefore trigger enormous amounts of unnecessary work.
That has been redesigned.
Rectangle and Ellipse Selection now use geometry-only live previews while you drag. The actual selection mask is constructed once when the mouse is released. Replace, Add, Subtract, Intersect and XOR behavior is preserved.
On a 2800×1800 test:
- four selection-drag updates: ~1.86 seconds → ~0.00004 seconds
- the actual mask commit occurs once on release: ~0.03 seconds
- an 8K selection drag is likewise essentially immediate while moving
I also found several secondary problems contributing to the feeling that “live preview” was slow.
Adjustment/effect previews with an active selection previously:
- compressed the complete layer before previewing
- copied the complete selection mask
- processed the complete image even if only a small selected region mattered
- created complete-image Undo snapshots when Apply was pressed
That is now localized.
For an 800×600 selection inside a 2800×1800 document:
- first preview setup: ~0.646 s → ~0.00034 s
- actual adjustment preview: ~0.57–0.69 s → ~0.11–0.12 s
- selected adjustment Apply: ~0.78 s → ~0.13 s
- selected Apply history storage: ~34.9 MiB → ~3.2 MiB
The preview result remains pixel-identical.
Files
Get LinXPaint
LinXPaint
A developing paint program that is simple to use with many more features to come.
| Status | In development |
| Category | Tool |
| Author | DarkTower7899 |
| Tags | 16-bit, 8-Bit, Indie, linux, paint, Sprites, spritesheet, Tilemap |
More posts
- I am aware of the new issues.53 minutes ago
- New toolbar for the tools options.2 hours ago
- Updated the tools options menu.7 hours ago
- Found a few more optimization opportunities.11 hours ago
- The magic wand tool is not working as intended.14 hours ago
- Performance issues.15 hours ago
- Added an optional Local AI Masking plugin.15 hours ago
- Huge performance increase.16 hours ago
- Upcoming bug fixes and features.1 day ago
Leave a comment
Log in with itch.io to leave a comment.