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: read larger chunks in logiterator #1179

Merged
merged 2 commits into from
Mar 12, 2024
Merged

Conversation

icewind1991
Copy link
Member

This speeds up iterating through log files by about 30x in my testing

8192 is chosen because it's the size of the php internal read buffer

@come-nc
Copy link
Contributor

come-nc commented Mar 11, 2024

There was 1 failure:

1) OCA\LogReader\Tests\Unit\Log\LogIteratorTest::testGetLines
Failed asserting that actual size 0 matches expected size 2.

this makes it work better with chunk size > line length

Signed-off-by: Robin Appelman <[email protected]>
@icewind1991 icewind1991 force-pushed the logiterator-larger-chunks branch from 835c7d6 to 32f93c2 Compare March 12, 2024 12:25
@icewind1991 icewind1991 merged commit ee1f422 into master Mar 12, 2024
24 checks passed
@icewind1991 icewind1991 deleted the logiterator-larger-chunks branch March 12, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants