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

linxpaint_0.16.45_OLD.deb 16 MB
14 hours ago

Get LinXPaint

Download or claim
On Sale!
100% Off
$20.00 $0.00 USD or more

Leave a comment

Log in with itch.io to leave a comment.