mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2497] [Issue]: Projected storage_list cache validation hashes full collection files #1237
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#1237
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Promansis on GitHub (Jun 6, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2497
Originally assigned to: @Promansis on GitHub.
Summary
CrabNebula DevTools reports slow
storage_listcalls. Investigation on the refactor branch found that projectedstorage_listcache validation recalculates a collection file stamp by hashing the whole collection file before it can return a cached projected list.Code pointers from the current checkout:
src-tauri/crates/storage/src/lib.rs:1068callscollection_file_stampwhile serving projected lists.src-tauri/crates/storage/src/lib.rs:2323computes the stamp by reading and hashing the collection file.Expected behavior
Repeated projected
storage_listcalls against an unchanged collection should hit a cache through cheap validation, such as an in-memory collection generation, metadata/mtime plus size where sufficient, or another storage-owned revision marker.Actual behavior
Projected list cache validation is still proportional to the full JSON collection file size. Large collections can therefore make a cache hit look slow in CrabNebula DevTools because every projected list call streams and hashes the file before returning.
Steps to reproduce
storage_list.storage_listtaking a long time even when the projected result should already be cached.Impact area
Environment
refactoratf9fc46b9v24.12.0, pnpm10.33.2rustc 1.95.0 (59807616e 2026-04-14)Logs, screenshots, or video
No screenshot attached. Local observation was CrabNebula DevTools showing slow
storage_listcalls.Focused storage tests were run during investigation and passed. The code path above is the suspected root cause.
Regression notes
Unknown whether this regressed from a previous storage implementation or became visible as collection sizes grew.
Additional context
This likely affects hot projected list paths such as character/persona/chat summary lists and other collection-backed UI surfaces. A likely fix target is to avoid per-call full-file hashing for projected cache validation and instead invalidate projected caches through storage-owned revision state when writes/imports mutate the collection.
Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: