Skip to content

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

Merged
mudler merged 2 commits into
mudler:masterfrom
richiejp:chore/gallery-speed-meta
May 6, 2026
Merged

feat(gallery): Speed up load times and clean gallery entries#9211
mudler merged 2 commits into
mudler:masterfrom
richiejp:chore/gallery-speed-meta

Conversation

@richiejp

@richiejp richiejp commented Apr 3, 2026

Copy link
Copy Markdown
Collaborator

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

mudler commented Apr 23, 2026

Copy link
Copy Markdown
Owner

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 2 times, most recently from 4c17120 to 90db416 Compare May 5, 2026 05:33
@richiejp

richiejp commented May 5, 2026

Copy link
Copy Markdown
Collaborator Author

OK, seems ready to go.

@mudler

mudler commented May 5, 2026

Copy link
Copy Markdown
Owner

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

mudler
mudler previously approved these changes May 5, 2026

@mudler mudler left a comment

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.

Nice!!

@mudler

mudler commented May 5, 2026

Copy link
Copy Markdown
Owner

@copilot resolve the merge conflicts in this pull request

richiejp added 2 commits May 6, 2026 10:48
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 81fca12 to 2bcb5f6 Compare May 6, 2026 09:48
@mudler
mudler merged commit 969005b into mudler:master May 6, 2026
49 checks passed
@localai-bot localai-bot added the enhancement New feature or request label May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request needs-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants