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

Fix MemoryFS performance issue with big files #180

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gyurix
Copy link

@gyurix gyurix commented Nov 25, 2023

I tried to copy a big file to the MemoryFs, and realized it's incredible slow. After some investigation I found out that this line of code copies the whole file every single time some bytes gets appended to it, making the writing process slower and slower the bigger the file gets. After this fix I measured over 50-100x performance increase with a 1GB file.

Copy link
Owner

@SerCeMan SerCeMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, @gyurix! Thank you for the contribution! The tests on CI seem to be failing with the new change. Do they pass locally for you?

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.

2 participants