tracexec icon indicating copy to clipboard operation
tracexec copied to clipboard

[Performance] Optimize memory usage

Open kxxt opened this issue 1 year ago • 1 comments

For now there's lots of clones involved in the code. We could use something like https://github.com/thomcc/arcstr to optimize the memory footprint.

The tui can already handle 100000 events with a very low idle cpu usage without hassle thanks to the complex multi-layer cache system I implemented. But the memory usage doesn't look nice to me (total ram 16GB).

image

kxxt avatar May 14 '24 14:05 kxxt

The search feature caches all the lines in string representation to make it memory-contiguous, which would double the memory usage. Ideally the regex should be able to work on chunks of strs : https://github.com/rust-lang/regex/issues/425 . Maybe I should give https://github.com/pascalkuthe/regex-cursor a try

kxxt avatar May 14 '24 23:05 kxxt