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

High CPU usage in main menu #151

Open
fergushev opened this issue Mar 23, 2024 · 0 comments
Open

High CPU usage in main menu #151

fergushev opened this issue Mar 23, 2024 · 0 comments

Comments

@fergushev
Copy link

The current sleep fix for D2Win (https://github.com/bayaraa/d2gl/blob/master/d2gl/src/d2/common.cpp#L175) doesn't appear to work as expected. CPU usage is high both with and without that patch and it looks something like this:

(This is "% Processor Time" in Perfmon)
image

If you change it to NOP 6 bytes (TEST, JZ, XOR) starting at offset D2WIN+0x18A5D (1.13c) then you keep the Sleep(20) call and CPU usage looks like this:

image

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

No branches or pull requests

1 participant