xvfb-run slow and rtfm
Posted by simonw
on Wed 24 Apr 2013 at 15:43
Exasperated at performance of some automated browser rendering we do, 6 seconds elapse, 0.7 seconds of CPU usages, I finally used strace and found it is calling sleep in the middle of my script.
This led me to the manual page for xvfb-run, which indeed notes it deliberately inserts a three second wait before it runs the command. Once upon a time maybe....
"xvfb-run --wait=0" reduces my run time for screenshot from 6 seconds elapse to 3 seconds elapse. So I still have 2.3 seconds of "idle" time. Some, possibly all, of this is due to slow response from the webserver. Still the first half of my elapse time gave itself up easily.