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

perf: add buffering to FileWritingService #435

Merged
merged 2 commits into from
Feb 17, 2023

Conversation

melotic
Copy link
Member

@melotic melotic commented Feb 16, 2023

This adds buffering to the FileWritingService. Previously, every log message synchronously called File.AppendAllText.

This should help increase performance for #373 and across the board.

Profiling Component Detection lead to serious performance gains:

Before:
image

After:
image

@melotic melotic requested a review from a team as a code owner February 16, 2023 23:20
@melotic
Copy link
Member Author

melotic commented Feb 17, 2023

Benchmarking with hyperfine yield an 8% performance increase:

Command Mean [s] Min [s] Max [s]
origin/main 8.604 ± 0.889 7.576 10.621
buffering 7.920 ± 0.157 7.710 8.259

@melotic melotic merged commit 9df530a into main Feb 17, 2023
@melotic melotic deleted the justinperez/buffer-file-writer branch February 17, 2023 17:04
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.

None yet

2 participants