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

Revert "Use Win32 API in hsFileStream." #246

Merged
merged 1 commit into from
May 19, 2022
Merged

Conversation

zrax
Copy link
Member

@zrax zrax commented May 18, 2022

Reverts #242

This causes a massive performance regression in reading PRPs (see H-uru/PlasmaShop#64):

There are also reports of written PRPs containing the wrong or outdated content (see #244).

This can be re-added in the future if the issues can be resolved, but for now I'd like to get a new release of libhsplasma and PlasmaShop that fixes these regressions.

Resolves #244
Resolves H-uru/PlasmaShop#64

Copy link
Member

@Hoikas Hoikas left a comment

Choose a reason for hiding this comment

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

As I said in IRC:

Yeah, we probably need to revert the Win32 stream thing. The overhead on calls to ReadFile() is nuts. We'd need to implement our own buffering for this to not suck, and I don't feel like doing that right now...

@zrax zrax merged commit 2327302 into master May 19, 2022
@zrax zrax deleted the revert-242-windows_stream branch May 19, 2022 00:48
Hoikas added a commit to Hoikas/korman that referenced this pull request Jan 16, 2023
This was fixed in H-uru/libhsplasma#242 originally, but Win32 APIs seem
to have terrible performance without user mode buffering, which
negatively impacted PRP loading in other tools, such as PRP Shop.
Therefore, the fix was reverted in H-uru/libhsplasma#246. This fixes the
race condition closer to the point of impact using the Win32 stream
introduced by H-uru/libhsplasma#264.
Hoikas added a commit to Hoikas/korman that referenced this pull request Jan 18, 2023
This was fixed in H-uru/libhsplasma#242 originally, but Win32 APIs seem
to have terrible performance without user mode buffering, which
negatively impacted PRP loading in other tools, such as PRP Shop.
Therefore, the fix was reverted in H-uru/libhsplasma#246. This fixes the
race condition closer to the point of impact using the Win32 stream
introduced by H-uru/libhsplasma#264.
Hoikas added a commit to H-uru/korman that referenced this pull request Jan 18, 2023
This was fixed in H-uru/libhsplasma#242 originally, but Win32 APIs seem
to have terrible performance without user mode buffering, which
negatively impacted PRP loading in other tools, such as PRP Shop.
Therefore, the fix was reverted in H-uru/libhsplasma#246. This fixes the
race condition closer to the point of impact using the Win32 stream
introduced by H-uru/libhsplasma#264.
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.

Files not saving correctly with Use Win32 API commit Latest release loading and saving slowly
2 participants