Slow Jpeg2000 (JP2) performance

Ideas for improvements and requests for new features in XnView MP

Moderators: XnTriq, helmut, xnview

ChangeMe9000
Posts: 5
Joined: Sat Feb 25, 2023 5:01 pm

Slow Jpeg2000 (JP2) performance

Post by ChangeMe9000 »

I'm on a M1 Pro mac and have to say the performance of viewing jp2 files in XnView is very slow compared to other alternatives. I'd say it's 3-4x slower on large images compared to e.g. Phoenix Slides, which is open source. Some optimisations would be very welcome.
User avatar
xnview
Author of XnView
Posts: 43611
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Slow Jpeg2000 (JP2) performance

Post by xnview »

XnView MP uses OpenJPEG, but i think that Phoenix Slides uses internal macos codec
Pierre.
ChangeMe9000
Posts: 5
Joined: Sat Feb 25, 2023 5:01 pm

Re: Slow Jpeg2000 (JP2) performance

Post by ChangeMe9000 »

xnview wrote: Fri Apr 12, 2024 9:45 am XnView MP uses OpenJPEG, but i think that Phoenix Slides uses internal macos codec
Ok. Phoenix Slides does seem slightly faster than the built-in macos preview app, though.

I've done some more comparisions, and it's not just Jpeg2000 that's remarkably faster, but also decoding large jpeg and jpeg-xl images.
The ultimate image viewer would have the functionality of XnView and the speed of Phoenix Slides :)
User avatar
foxyshadis
Posts: 393
Joined: Sat Nov 18, 2006 8:57 am

Re: Slow Jpeg2000 (JP2) performance

Post by foxyshadis »

I checked, and ultimately Phoenix uses CGImageSourceCreateWithData, the main MacOS image decoding API, which is very optimized and GPU accelerated. While XnView normally only uses built-in code, it's not impossible that it could interface with MacOS's API... just doesn't seem likely, especially without a testing environment.

Maybe if QT ever natively supports it?