Zend certified PHP/Magento developer

How can listing processes on the terminal be so slow in Windows? Can this be sped up?

I have finally come up with this command:

tasklist /V /NH | find "test"

It lists all running processes with “verbose” information (the “window title” is what we need, so /V must be used), skips the header line, and then pipes this into “find” to only match processes that contain “test” somewhere.

As I’m typing this, I realize that it checks for “test” anywhere in the entire line as outputted by tasklist, which is not the intention (it’s supposed to only check the window title part), but this is of secondary importance since it will in practice never match since “test” is in reality a string with several spaces which is very unlikely to ever appear in the rest of the line.

Anyway, the above command takes literally seconds to run, and it’s not because of the piping to “find”, because I’ve tried it without it. It’s just very sluggish at fetching this information, which you’d think would be so readily available in RAM that you’d almost get an answer before issuing the command, but apparently they are doing some convoluted logic which appears to be reading large chunks of disk storage. (How else to explain the seconds of loading each and every time?)

Having read the manual for “tasklist”, there is no way to specify that I only care about the “window title” and that’s all I want it to output (which might be faster).

I did notice that it’s much faster if you filter by a specific “image” (EXE), but I don’t want that since this is supposed to only check/care about the “window title” (also known as “process title”).

Any good ideas?