[OPTIM] process_cli/process_srv:  reduce the number of tests

We can skip a number of tests by simply checking a few flags,
it saves a few CPU cycles in the fast path.
1 file changed