jif
aae4c0b02b
bound prompt image cache retention ( #28294 )
...
## Why
The prompt image cache was bounded to 32 entries, but not by the size of
those entries. A set of large encoded images could therefore retain
substantially more memory than intended. Cache hits also cloned the full
encoded payload.
## What changed
- cap the cache at 64 MiB of encoded image data while preserving its
existing 32-entry limit
- skip caching an image that exceeds the entire byte budget
- evict least-recently-used entries until the cache is back within its
byte budget
- share cached encoded bytes with `Arc<[u8]>` so cache hits do not
deep-clone image payloads
## Validation
- `just test -p codex-utils-image`
History
..
2026-06-08 11:39:08 +02:00
2026-06-09 12:48:04 -07:00
2026-05-26 20:59:47 -07:00
2026-06-11 18:16:39 -07:00
2026-06-12 15:50:30 -07:00
2026-05-07 15:44:17 -07:00
2026-06-15 10:25:37 -07:00
2026-06-11 22:30:41 -07:00
2026-06-11 21:28:52 -07:00
2026-06-15 15:35:57 +00:00
2026-06-15 15:35:57 +00:00
2026-06-12 20:10:12 -07:00
2026-06-12 16:58:42 -07:00
2026-06-03 19:08:19 -07:00
2026-06-11 18:16:39 -07:00
2026-05-08 04:07:59 +00:00
2026-06-13 21:43:39 -07:00
2026-06-13 21:43:39 -07:00
2026-06-15 13:50:08 +01:00
2026-06-12 22:03:51 +00:00
2026-06-12 21:23:50 +00:00
2026-06-12 21:23:50 +00:00
2026-06-11 18:16:39 -07:00
2026-06-11 18:16:39 -07:00
2026-06-12 02:49:17 -07:00
2026-06-11 22:37:26 -07:00
2026-06-12 02:49:17 -07:00
2026-06-15 19:11:26 +02:00
2026-06-01 21:25:42 -07:00
2026-06-15 19:11:26 +02:00
2026-05-07 15:44:17 -07:00
2026-06-11 19:28:47 +00:00
2026-06-15 11:10:51 +02:00
2026-06-13 21:43:39 -07:00
2026-06-12 20:10:12 -07:00
2026-05-28 22:08:05 -07:00
2026-06-03 13:32:55 +02:00
2026-06-15 19:24:50 +02:00
2026-06-15 08:06:14 -07:00
2026-06-15 14:04:01 +01:00
2026-06-13 21:43:39 -07:00
2026-06-05 15:41:13 -07:00
2026-06-14 00:14:26 -07:00
2026-06-15 17:24:36 +02:00
2026-06-07 17:35:33 -07:00
2026-06-13 21:43:39 -07:00
2026-06-15 17:15:45 +02:00
2026-06-04 14:16:03 -04:00
2026-06-08 14:16:32 -04:00
2026-06-15 08:23:02 -07:00
2026-05-26 15:59:25 -07:00
2026-05-07 15:44:17 -07:00
2026-06-12 12:12:08 -07:00
2026-05-28 23:09:55 -07:00
2026-06-12 16:58:42 -07:00
2026-06-13 21:43:39 -07:00
2026-06-03 19:08:19 -07:00
2026-06-12 19:52:49 +00:00
2026-06-05 09:34:36 -07:00
2026-05-07 15:44:17 -07:00
2026-06-13 21:43:39 -07:00
2026-06-11 19:28:47 +00:00
2026-06-15 08:28:02 -07:00
2026-06-04 09:53:08 -04:00
2026-06-11 18:16:39 -07:00
2026-06-05 17:36:18 -07:00
2026-06-13 21:43:39 -07:00
2026-06-11 18:16:39 -07:00
2026-06-04 09:53:08 -04:00
2026-06-15 09:59:26 -07:00
2026-06-15 11:52:05 +02:00
2026-05-25 17:26:10 -03:00
2026-06-13 21:43:39 -07:00
2026-06-15 17:17:34 +00:00
2026-05-07 15:44:17 -07:00
2026-05-07 15:44:17 -07:00
2026-06-13 20:56:42 +00:00
2026-06-14 00:14:26 -07:00
2026-06-12 13:50:04 -07:00
2026-06-13 21:43:39 -07:00
2026-05-26 20:59:47 -07:00
2026-06-12 19:52:49 +00:00
2026-06-15 08:28:02 -07:00
2026-06-11 18:16:39 -07:00
2026-06-13 21:43:39 -07:00
2026-06-14 00:14:26 -07:00
2026-05-07 15:44:17 -07:00
2026-05-13 21:23:19 +00:00
2026-05-07 15:44:17 -07:00
2026-06-12 18:11:13 +00:00
2026-06-14 00:14:26 -07:00
2026-06-15 08:06:14 -07:00
2026-06-15 10:25:37 -07:00
2026-05-07 15:44:17 -07:00
2026-06-15 19:52:30 +02:00
2026-06-13 21:43:39 -07:00
2026-06-13 21:43:39 -07:00
2026-06-13 21:43:39 -07:00
2026-06-15 13:50:08 +01:00
2026-06-13 21:28:31 -07:00
2026-06-11 18:16:39 -07:00
2026-06-04 09:16:03 -07:00
2026-05-26 20:59:47 -07:00