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

Added IBufferedFileStream - a faster variant of IFileStream designed … #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

intorr
Copy link

@intorr intorr commented Oct 4, 2024

…for working with small files such as kosaves.

Now when using plugins that save a lot of small chunks in the kosave, the saving itself is very slow.
For example, for Skyrim AE, when using the RaceMenu plugin, saving specific plugin data takes about 2 seconds.
If you use the new class, this time is reduced to 50 milliseconds.

I'm not very good at writing C++, but maybe this or a similar change should be made to make saving much faster?

Paired pull request for ianpatt/skse64#44

…for working with small files such as kosaves.
@ianpatt
Copy link
Owner

ianpatt commented Oct 13, 2024

Thank you for the submission - this is interesting, but I'd need to rewrite it as you mentioned. Rather than a combination buffer-writer and file-writer, just have a std::vector-backed buffer stream, write to that, then write that stream to a file.

@intorr
Copy link
Author

intorr commented Dec 4, 2024

Like this?

Rewrote IBufferedFileStream - now using std::vector and a separate IFileStream for reading/writing.

@intorr
Copy link
Author

intorr commented Jan 14, 2025

Tested for over two months. Didn't find any errors, works well.

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