run-this-one is very slow
Bug #1917157 reported by
Sven Hartrumpf
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
run-one (Ubuntu) |
Triaged
|
Low
|
Unassigned |
Bug Description
All invocations of run-this-one are slowed down massively (since Ubuntu 20.04, also in Ubuntu 20.10). Example:
time run-this-one echo
real 1,902s user 1,216s syst 0,182s busy 73,47%
The slow down depends on the stack size of your shell. So, this is probably caused by the pgrep call for run-this-one (see Ubuntu bug #1874824 ). As the 1y-old upstream fix for bug #1874824 is not applied to the Ubuntu packages, could run-one avoid pgrep calls?
tags: | added: focal groovy hirsute |
To post a comment you must log in.
Thank you for taking the time to report this bug and helping to make Ubuntu better.
I can reproduce this. I quickly instrumented run-this-one to see why it takes time. The pgrep took 5.4ms, so avoiding the pgrep won't help. The lsof call took 1376ms, so that's where most of the delay is. There's also a "sleep 0.5" in there. The sleep together with the lsof account for most of the time.
Suggestions welcome.
I'm marking Importance: Low since I can't imagine a use case where this would cause a real practical impact to Ubuntu users. If you're affected more severely, please explain your use case.