Skip to content

Running out of cpu and crashing when loading a huge amount of images #86

Description

@Yasumora

Describe the bug

  • When loading 400k+ (410k in average) images from multiple folders the program seems to run out of CPU and crashes. My total library is 630k~ images and when loading below the 380k image count the program works flawlessly. I've tried loading these images in Name, Natural and Random order.

To Reproduce

  • Not quite sure how to reproduce? I believe this has to do with my processor not being powerful enough, a solution may be loading chunks of the bigger folders instead of preloading all of them?
    I will eventually port my library from jpeg to jpeg-xl so that will probably make the situation a little better as jpeg-xl seems to be more optimized. But I still wanted to report this issue in case there's a way to fix it or work around it.

Expected behavior

  • The library should load normally.

Allusion version

  • 1.0.0-ruc.9.0 AppImage

Desktop OS

  • CachyOS, KDE with kernel 6.17.9-2.

  • Most of my Images are in the jpeg formats and my specs are the following:

  • AMD Ryzen 5 2600 (6C/12T) @ 3.40 GHz

  • DDR4 32 GB @ 3000MT/s RAM

Additional context

  • I had the same issue on pre-fork versions of Allusion and OneFolder, although those ones did crash at 200k on windows (old Allusion) and 130k on Linux (both old Allusion and OneFolder, tested on December 2024). So the performance is much better on this fork of allusion, before the new watcher merge the program was crashing at around 300k images (tested on 1.0.0-ruc.8.0) and now my tests give me the following results:

TEST 1 : 411136 pics
Peaks at 4.89GB memory
CPU fluctuates between 30 and 70%

TEST 2 :
418816 pictures peaked at 7.11GB memory, peaked at 70~% CPU usage

TEST 3 :
419584 pictures peaked at 5.14GB memory, peaked at 70~% CPU usage

In all 3 tests after 10 mins of the program being frozen, memory usage goes down to 700MB~ and processor usage back to 1%, the program remains frozen after that.

  • I'm open to providing any extra information if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions