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

Snapshot take more than 7000ms when "owner" field is setup #25

Open
fraxken opened this issue Aug 30, 2018 · 3 comments
Open

Snapshot take more than 7000ms when "owner" field is setup #25

fraxken opened this issue Aug 30, 2018 · 3 comments
Labels

Comments

@fraxken
Copy link

fraxken commented Aug 30, 2018

Hi,

After few tests on my Windows. When i setup the field "owner" it take more than 7,000ms for the snapshot method to be achieved. I have not tested the UNIX version yet to look if this a problem only related to the Windows platform.

Code example

const { snapshot } = require("process-list");

const fieldsToRetrieve = new Set([
    "name",
    "owner"
]);

async function main() {
    console.time("exec");
    const tasks = await snapshot(...fieldsToRetrieve);
    console.timeEnd("exec");
}
main().catch(console.error);

stdout

λ node index
exec: 7939.677ms

All others fields are well retrieved !

Best Regards,
Thomas

@reklatsmasters
Copy link
Owner

This issue related only to Windows. Somewhere in wmi api docs I’ve seen a mention of this problem. I have no idea how to improve speed of this field.

@fraxken
Copy link
Author

fraxken commented Aug 30, 2018

Ok, i will take a look to optimize this (if i found something xD).

@reklatsmasters
Copy link
Owner

Awesome! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants