Skip to content

perf(media): amortize fast_image_resize Resizer scratch buffers across thumbnail-worker iterations #111

Open

Description

@utof

L4 landed fast_image_resize 6.0 at commit c2b45e4 with 6.9× speedup. Double code review flagged that Resizer::new() is constructed inside resize_image every call, discarding internal scratch buffers. Resizer is designed to be reused (docs.rs confirms scratch buffers + cached CPU-extension dispatch).

Candidate designs: (1) Mutex on ThumbnailGenerator; (2) thread_local! RefCell; (3) worker-local Resizer passed in via fn resize_image_with(&self, resizer: &mut Resizer, img) — touches queue.rs too.

Parent: #80 (L4 follow-up).

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/needs-research

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions