Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Performance] Optimize memory usage #24

Open
kxxt opened this issue May 14, 2024 · 1 comment
Open

[Performance] Optimize memory usage #24

kxxt opened this issue May 14, 2024 · 1 comment
Assignees
Labels
difficulty-difficult enhancement New feature or request perf Performance related priority-normal tracer Core tracer component

Comments

@kxxt
Copy link
Owner

kxxt commented May 14, 2024

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 kxxt added enhancement New feature or request priority-normal tracer Core tracer component difficulty-difficult perf Performance related labels May 14, 2024
@kxxt kxxt self-assigned this May 14, 2024
@kxxt
Copy link
Owner Author

kxxt commented May 14, 2024

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 : rust-lang/regex#425 . Maybe I should give https://github.com/pascalkuthe/regex-cursor a try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty-difficult enhancement New feature or request perf Performance related priority-normal tracer Core tracer component
Projects
None yet
Development

No branches or pull requests

1 participant