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

Performance improvement #12

Open
gjaegy opened this issue Feb 6, 2020 · 0 comments
Open

Performance improvement #12

gjaegy opened this issue Feb 6, 2020 · 0 comments

Comments

@gjaegy
Copy link

gjaegy commented Feb 6, 2020

You'll definitively hate me :)

Anyway, while running the current version of our software with Memtrace, I got something like 1 frame every 10 seconds, meaning running our test scenario tooks hours.

Looking at task manager, MemTraceTool.exe was using 100% of a core while our application was simply waiting for Memtrace to become responsive.

Profiling Memtrace easily detected the culprit: about 99% of the CPU time was spent in List::Contains(), which is called in TraceTranscoder.cs line 534.

Adding a complimentary HashSet to perform this operation in a non-linear time made a huge difference (our application is running at half of its normal speed now, which is more than acceptable).

I'm not very good with pull requests, I thought you would be easily able to find the two little changes using WinMerge on your side. Attached the updated TraceTrancoder.cs file renamed as .txt (.cs files can't be attached).

TraceTranscoder.txt

I would be really glad if you could check and merge that change in the main branch, it makes MemTrace simply usable again for us !

Thanks a lot :)

lastquest added a commit to lastquest/ig-memtrace that referenced this issue Jun 19, 2021
Improve performance during a MemTrace capture:

- adding an HashSet in the tools code to avoid linear search time (deplinenoise#12)
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