Skip to content

Faster thumbs#172

Open
CrystalSplitter wants to merge 6 commits into
masterfrom
faster-thumbs
Open

Faster thumbs#172
CrystalSplitter wants to merge 6 commits into
masterfrom
faster-thumbs

Conversation

@CrystalSplitter

Copy link
Copy Markdown
Collaborator

Implement lazy-loading for thumbnail fetching.

We give thumbnails exactly 1 second to load to prevent flashing, but after that we give up and let them load
in the background without waiting. This is implemented by keeping track of an item's thumbnailJobs, and
then dispatching state/updating the DB on their completion.

Fixes #171.

Before, we it was possible to update the item without actually dispatching to
the Redux state. This fixes this, in a very convoluted way.
It still could be better, but it's a lot better than before.

Now we have some rate-limitting on thumbnail extraction, so hopefully we won't get 429s.
@CrystalSplitter

CrystalSplitter commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator Author

Hmm. This has a bug where thumbnails will show up as black boxes occasionally, even when we already have the thumbnails fetched and stored in the DB.

Not sure why. Perhaps something to do with the thumbnail canvas caching?

@CrystalSplitter

Copy link
Copy Markdown
Collaborator Author

Hmm. This has a bug where thumbnails will show up as black boxes occasionally, even when we already have the thumbnails fetched and stored in the DB.

Not sure why. Perhaps something to do with the thumbnail canvas caching?

Oh; that may have been because of network throttling I had during testing. That would make more sense.

Much more ergonomic to use a method fetch rather than pass it
as the final argument of a long method.
This is more clean up work, should not have any functional change.
This adds a number of stricter static checks, as well
as fixes for thumbnail parsing with redux ordering.
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.

Fetching Thumbnails Blocks for Too Long

1 participant