python-webkit2png
python-webkit2png copied to clipboard
add sleep to decrease cpu usage while waiting for response
before:
$ time webkit2png --xvfb 1024 1024 -g 1024 1024 --scale 200 200 --aspect-ratio=keep --timeout=30 --log='' -o /tmp/img.png http://long-site
real 0m10.553s
user 0m8.383s
sys 0m2.092s
after:
$ time webkit2png --xvfb 1024 1024 -g 1024 1024 --scale 200 200 --aspect-ratio=keep --timeout=30 --log='' -o /tmp/img.png http://long-site
real 0m11.074s
user 0m0.412s
sys 0m0.078s
Isn't 0.5 seconds quite a lot?
#62 also has this change: 81460b13e5a386cbffca52fea1ec293b7c0f06aa