Skip to content

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