Skip to content

Fix slowdown caused by initializing KisMagneticWorker

When creating/opening a new image. The initialization in the constructor is redundant, since the tool is always reinitialized in KisToolSelectMagnetic::activate.

The slowdown is noticeable when running a colorspace other than RGBA 8-bit, due to the slower colorspace conversion in KisMagneticWorker's constructor.

Test Plan

Open an image with colorspace other than 8-bit RGBA, there should be a noticeable reduction in the image load time (somewhere between 3-5 secs on my system).

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.

Merge request reports

Loading