Skip to content

Significantly optimize logs rendering (CPU and Memory)#197

Merged
azat merged 2 commits intomainfrom
optimize-logs
Nov 30, 2025
Merged

Significantly optimize logs rendering (CPU and Memory)#197
azat merged 2 commits intomainfrom
optimize-logs

Conversation

@azat
Copy link
Owner

@azat azat commented Nov 30, 2025

There is no need to build complete content for all logs, it can be
constructed only for visible part of log, the only thing that we need is
to calculate the total number of rows (with respecting wrapping),
for this we can store array of sums.

This should make rendering faster:

  • incremental logs processing faster (since it does construct the StyledString on new data)
  • filters

And also reduces memory consumption 2x - confirmed in manual tests
(300MiB -> 150MiB)

azat added 2 commits November 30, 2025 18:51
There is no need to build complete content for all logs, it can be
constructed only for visible part of log, the only thing that we need is
to calculate the total number of rows (with respecting wrapping),
for this we can store array of sums.

This should make rendering faster:
- incremental logs processing faster (since it does construct the StyledString on new data)
- filters

And also reduces memory consumption 2x - confirmed in manual tests
(300MiB -> 150MiB)
@azat azat merged commit 27ef4db into main Nov 30, 2025
8 checks passed
@azat azat deleted the optimize-logs branch November 30, 2025 18:00
@azat azat changed the title Optimize logs rendering (CPU and Memory) Significantly optimize logs rendering (CPU and Memory) Nov 30, 2025
@azat azat mentioned this pull request Nov 30, 2025
azat added a commit that referenced this pull request Dec 2, 2025
azat added a commit that referenced this pull request Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant