BrookJeynes / zfe

A small unix terminal file explorer.
MIT License
33 stars 2 forks source link

bug: Explorer freezes when loading big image #4

Open AleryBerry opened 1 month ago

AleryBerry commented 1 month ago

Describe the bug When moving fast through files, if it catches a big image file, it freezes until the image is loaded, even though I jumped out of the file already.

To Reproduce Go to any directory with any big image and other files. Hold J to navigate down the directory. When it catches the big file, it freezes and jumps 2-4 files ahead when the file finishes loading.

Expected behavior The explorer should behave smoothly and kill the loading process if the user already jumped out of the file.

BrookJeynes commented 1 month ago

Hey @AleryBerry, thanks for the bug report. I'm currently working on this issue!

It's unfortunately a bit of a tricky one but I'm going to test with updating the library / possibly threading the image loading process as to not cause the user to freeze.

BrookJeynes commented 1 month ago

Hey @AleryBerry, I've gone ahead and created a new release which should help with viewing large images. You can download the latest version here https://github.com/BrookJeynes/zfe/releases/tag/v0.5.0

Unfortunately, this doesn't really fix the issue at hard but more or less optimises the current approach. I'm going to leave this issue open as I plan to experiment with threading the image loading process to hopefully fix the problem at its root.

AleryBerry commented 1 month ago

@BrookJeynes I tested it and it's working a lot better although it still freezes the explorer a bit. Looking forward for the threading update!