Skip to content

Conversation

@G2Pavon
Copy link
Contributor

@G2Pavon G2Pavon commented Nov 30, 2025

Added find_files_recursively() in src\utils\misc.rs. So it can be used in other gchimp modules too

also used walkdir, since apparently it's fast enough, and it also handles complex cases like many subdirs and symslinks

This feature it's a bit slow, but that's probably a limitation of egui i think. It's probably possible to speed up this, but idk how :/

@khanghugo
Copy link
Owner

The bottleneck here is not the walkdir or IO but it is the computation. Usually, what I'd do is to use rayon to speedup processing images.

If you are invested in this, you should process all images in parallel using rayon and then modify WaddyGui::update_after_add_image to load all images together.

This is probably require a bit more work but the current implementation is fine.

@khanghugo
Copy link
Owner

khanghugo commented Nov 30, 2025

Currently, there are lots of work to load an image into Waddy.

  1. Feed a path
  2. Decode / deserialize image (heavy)
  3. Convert to 8 bit per pixel (heavy)
  4. Store it in WAD
  5. Convert new WAD entry into RGB8 again
  6. Create a new texture from RGB8 (just a lookup table, not heavy)
  7. Display RGB8 texture on Waddy

So, there are 3 2 heavy computations happening.

Due to the way how Waddy is designed, can't do it in 2 heavy computations.

And if anything, Waddy could be changed a bit to accommodate loading more than 1 texture at a time to support rayon

@khanghugo khanghugo merged commit 0412093 into khanghugo:master Nov 30, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants