luejerry / html-mangareader

A lightweight offline CBZ/CBR and image viewer with full continuous scrolling
MIT License
168 stars 15 forks source link

Too much memory usage with a big file #18

Closed L-Yvelin closed 2 years ago

L-Yvelin commented 2 years ago

When merging a whole manga in a single file, the app uses the whole computer's memory (Maybe loading the images in a certain buffer size, and unloading them when they go past it)

luejerry commented 2 years ago

Hi, I am testing an unreleased version of the app that should decrease memory usage. I don't know what kind of files you are trying to open with it, so would you mind giving this prerelease build a try and let me know how it works for your use case?

mangareader-win64-2.1.0.zip

L-Yvelin commented 2 years ago

Hi Jerry, your fix seems to be working really well. There's a little lag at the beginning or when you jump somewhere else, but that's probably just the images. Thank you very much! For info, the file I used was about 5000 pages CBZ file.

luejerry commented 2 years ago

Glad it worked ok! The lag when jumping to a page is a natural consequence of dynamically loading/unloading images, how bad it is will depend on your CPU/storage speed. Lag at startup is likely because the new app version does some background preprocessing for thumbnails to have them work with the dynamic image loading (for 5000 pages this can take quite a while), this can be sped up by disabling the right side navbar in the latest version.