-
-
Notifications
You must be signed in to change notification settings - Fork 582
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
CreateToolhelp32Snapshot is slow when there are a lot of threads #885
Comments
First of all you should search for To check the bottle neck you can simply run the following
|
And post link to LogFiles here |
Here are the logfiles. Doesn't minhook uses ConEmu-con-195456.log.txt |
I use my fork of minhooks, it doesn't use CreateToolhelp32Snapshot |
Problem description
I found opening new tab in ConEmu become slow after a prolonged use. This is an issue I initially found with mridgers/clink#420. I suspect the slowness in opening a new tab in ConEmu could be caused by
CreateToolhelp32Snapshot
too since I found a lot of call to this function in ConEmu sources.For example
In my current OS:
And this function needs to be called at least twice, that results in at least 500ms delay when opening a new tab.
Is it possible to replace some of the call to
CreateToolhelp32Snapshot
for suspending threads withNtSuspendProcess
. Also looking at the source ofNtSuspendProcess
, it seems possible to enumerate the threads of a process without enumerating all the threads in the system.The text was updated successfully, but these errors were encountered: