graphics: a session's placement table has no size bound #88
Labels
No labels
Area/ci
Area/cli
Area/client
Area/client-core
Area/daemon
Area/deps
Area/docs
Area/grid
Area/manual
Area/nix
Area/protocol
Area/pty
Area/render
Area/shaping
Area/skills
Area/transport
Area/vt
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Performance
Kind/Security
Kind/Testing
perf-regression-accepted
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Blocked
Status
Need More Info
Status
Upstream
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
felis-terminal/felis#88
Loading…
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?
A session's Kitty graphics placement table has no size bound. Each placement costs a table entry in the daemon and in every attached client's shadow, but nothing of the image store's 256 MiB byte budget, so a producer can grow both without limit by repeating puts of one small image:
a=p,i=1with a freshp=each time, or, since id-less puts became placements of their own, simplya=p,i=1withoutp=.The upsert scan over the table is also linear, so a large table slows every put.
kitty does not cap refs either, but a felis session outlives its window and its clients mirror the table, so the cost lands on the daemon and every client.
Repro: transmit a 1×1 image, then send
\e_Ga=p,i=1,c=1,r=1,q=2\e\\in a loop; the daemon's and the client's memory grow without bound.Decide: a per-session placement cap, set well above real producers (yazi's per-cell preview places a few thousand per image), evicting the oldest placement past it with its ref released and
PlacementRemovedsent, or refusing the put withENOSPC-style error. Also whether the table needs an index keyed by(image_id, placement_id)once it can be large.