natecraddock / zf

a commandline fuzzy finder and zig module designed for filtering filepaths
MIT License
469 stars 17 forks source link

Reduce memory consumption #21

Closed natecraddock closed 1 year ago

natecraddock commented 1 year ago

Zf uses an arena allocator for speed, and does not free memory during the application's runtime.

Each time the filter function is run, a new slice of Candidates is allocated, meaning that memory use grows as zf is run.

Even though zf is intended to be a short-lived program, we should still use as little memory as possible.