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 issue, blocking the main loop, using too much CPU #85

Open
emcodem opened this issue Sep 27, 2024 · 1 comment
Open

Performance issue, blocking the main loop, using too much CPU #85

emcodem opened this issue Sep 27, 2024 · 1 comment

Comments

@emcodem
Copy link

emcodem commented Sep 27, 2024

The execution takes about 5 seconds, it spends nearly all the time in ConnectedDomain function from table-parser module.
ConnecteDomain function seems to be extremely CPU intense, so much that it even blocks my main loop for a few seconds.

Code:

var ps = require("ps-node") 
ps.lookup({ pid: 0 }, function(err, resultList ) {
	console.log(resultList)
});
     

There are about 400 processes in the returned list, so pretty small string to parse, i am sure it can be done in fractions of a milliseccond.
Please let me know if you need more info, the issue feels to be so general to me that i don't know what else to say than i am on windows.

@emcodem
Copy link
Author

emcodem commented Sep 27, 2024

oh sry, i didnt notice this repo is dead, btw it also used about 400m RAM for this simple task, i call the wmic commandline myself now and regex the result, all finishes within a few milliseconds

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