Skip to content

feat(gallery): Speed up load times and clean gallery entries#9211

Open
richiejp wants to merge 2 commits intomudler:masterfrom
richiejp:chore/gallery-speed-meta
Open

feat(gallery): Speed up load times and clean gallery entries#9211
richiejp wants to merge 2 commits intomudler:masterfrom
richiejp:chore/gallery-speed-meta

Conversation

@richiejp
Copy link
Copy Markdown
Collaborator

@richiejp richiejp commented Apr 3, 2026

Description

Improve the gallery load times and clean up the gallery entry meta-data, in particular the known_usecases.

clip-04-06_11-49-23.mp4

Notes for Reviewers

  • Add known usecases to all gallery entries

Signed commits

  • Yes, I signed my commits.

Comment thread pkg/vram/cache.go Outdated
)

// Model-level estimate result cache — keyed by model ID, avoids re-running
// the full estimation pipeline (HTTP HEAD, GGUF reads, HF API) on every
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmm readers are already cached in this file, I'm missing what's the issue trying to solve here? the first loading of the page is slow because it runs estimations, but if you go back to page already loaded that's not loaded from scratch- unless I'm missing something?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found it to be very slow and this speeds it up mainly because it does the VRAM estimation asynchronously, but yeah I got into a mess here, there is a lot of duplication of VRAM estimation and we are doing quite a bit of unnecessary work. So I've reworked all of it into a single function and replaced the TTL cache with a generational cache and stuff like this.

@richiejp richiejp force-pushed the chore/gallery-speed-meta branch 2 times, most recently from 86fda78 to e98d30f Compare April 6, 2026 10:52
@richiejp richiejp force-pushed the chore/gallery-speed-meta branch from e98d30f to a525398 Compare April 14, 2026 10:39
@mudler
Copy link
Copy Markdown
Owner

mudler commented Apr 23, 2026

any chance to revive this PR before cutting a new rel ? 🫶

@richiejp
Copy link
Copy Markdown
Collaborator Author

any chance to revive this PR before cutting a new rel ? 🫶

probably not unfortunately, the code changes are pretty much done, but I have to fixup at least all of the popular models in the gallery which I have an agent to do that, but it still requires some manual review. Probably we also don't want to rush that into a release

@richiejp richiejp force-pushed the chore/gallery-speed-meta branch 3 times, most recently from 8f9a9cc to 2e5ab62 Compare May 5, 2026 04:38
@richiejp richiejp marked this pull request as ready for review May 5, 2026 04:38
@richiejp richiejp force-pushed the chore/gallery-speed-meta branch from 2e5ab62 to 4c17120 Compare May 5, 2026 04:50
richiejp added 2 commits May 5, 2026 06:32
Signed-off-by: Richard Palethorpe <io@richiejp.com>
Assisted-by: Claude:claude-opus-4-7[1m] [Claude Code]
…del entries

Signed-off-by: Richard Palethorpe <io@richiejp.com>
@richiejp richiejp force-pushed the chore/gallery-speed-meta branch from 4c17120 to 90db416 Compare May 5, 2026 05:33
@richiejp
Copy link
Copy Markdown
Collaborator Author

richiejp commented May 5, 2026

OK, seems ready to go.

@mudler
Copy link
Copy Markdown
Owner

mudler commented May 5, 2026

@richiejp there are merge conflicts, can't merge as is

Copy link
Copy Markdown
Owner

@mudler mudler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants