How slow is too slow?

Help
Robert S
2008-10-16
2012-12-15
  • Robert S
    Robert S
    2008-10-16

    I compiled khtml2png2 ver. 2.7.5 today and have it running on a new/clean Centos 5.2 machine.  The machine is in a data center and has no actual video or local users.

    Generating thumbnails seems to work properly using the following command:

    khtml2png2 -display 127.0.0.1:2 --sw 200 --sh 400 -w 1024 -h 768 -t 10 --disable-plugins --disable-java --disable-js http://www.example.com /tmp/myfile.png

    The problem is that it's very slow.  It takes about 90 seconds to generate a single thumbnail image.  Is that normal?

    There is nothing else running on the machine and the load is basically 0.00 and there is plenty of free memory.

    It seems like it's stuck waiting for something to time out.  Any ideas to improve performance?

     
    • Robert S
      Robert S
      2008-10-16

      Not sure if it matters or affects performance, but I launch Xvfb like so:

      Xvfb :2 -screen 0 1024x768x24&

       
    • Hi,

      khtml2png uses the kdelibs. So, if no KDE instance is currently started, it will starts loads of kde-base stuffs (dcop, ...) and this consumes time. You can avoid all this initialisation step by permanently running a KDE program (such as kwrite).

      The screenshot engine itself waits for all the elements of the page to be downloaded (or for network timeouts if this is not possible). You can specify as a command line argument the maximum time to wait for all the elements to be downloaded (argument --time|-t). Default is 30s.