Skip to content
Commit 4d1f22a4 authored by Stefan Brüns's avatar Stefan Brüns
Browse files

Set QImageReader format explicitly to avoid expensive probing

QImageReader::canRead will do fairly expensive probing based on the
content when passed a buffer instead of a file/filename. This is
mostly noticeable with the KImageFormats LibRAW (kimg_raw) plugin,
which creates a huge LibRAW class instance on each canRead call.

With the change, the canRead performance itself is almost doubled,
the cost of createIconImage is reduced by about 20% for typical SVG
icons, according to valgrind.
parent c65ea6b6
Pipeline #417307 passed with stage
in 15 minutes
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment