Replace xatomwait with xprop?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
LTSP5 |
Fix Released
|
Low
|
Vagrant Cascadian |
Bug Description
100 xatomwait instances need 20 MB RAM and use 100% of my client's CPU (of course that depends on the CPU).
100 xprop instances need 21 MB RAM and use 0% of my client's CPU.
Is there any reason to prefer xatomwait over a simple `xprop -spy` call,
which needs much less CPU, and would remove a couple of hundred lines from the LTSP codebase?
In ltsp-localappsd, this part of the code:
# Poll for LTSP_COMMAND changes and execute
while :; do
LTSP_
[ "$?" != 0 ] && exit
...could be replaced with something like:
# Initialization
xprop -root -f LTSP_COMMAND 8s -set LTSP_COMMAND ""
xprop -spy -root LTSP_COMMAND | while read output
do
cmd=$(echo "$output" | sed -n 's/.*"\
test -n "$cmd" || continue
echo "Executing: $cmd"
done
vagrantc mentioned that there were some tries with xprop before implementing xatomwait, does anyone remember if there were any problems with it?
If not, I'm willing to implement the xatomwait removal...
In http:// bazaar. launchpad. net/~ltsp- upstream/ ltsp/ltsp- trunk/revision/ 832 it appears that the old shell code used xprop+sleep in a loop, without xprop's "-spy" parameter. That was inefficient, and possibly the reason for the xatomwait.c move.
So I don't see any reason for not replacing xatomwait.c with xprop -spy...