Qt WebKit API is slow, true?

  • Using this code to load a webpage
    @ iWebFrame->load(QUrl("http://www.ifanr.com/64307"));
    connect(iWebFrame, SIGNAL(loadFinished(bool)), SLOT(process_LoadFinished(bool)));

    It takes 5+ minutes to get response in the slot function.

    Even if I set the url to a local html, it still takes 3 minutes.

    Not sure it's my reason or not.

    Full code is here: "ClickMe":https://skydrive.live.com/?cid=6466FE33F5454308&id=6466FE33F5454308!213

    Loading "www.google.com" takes 21 seconds - This proves that the enviroment is correct.
    Another page is from engadget.com, which takes 16 minutes. The page and its log is also attached.

  • The fact that you use qDebug for your timings, suggests that you are trying to profile using a Debug build. That is a bad idea. It doesn't tell you anything about real-world performance.

    However, your load times are extremely slow. 3 minutes is for a local HTML page is rediculous. Obviously, Qt Webkit normally isn't that slow. That is just plain unworkable. AFAIK, it is used in Qt Creator & Assistent as well to show the help pages, and I for one have no complaints about performance there.

  • Thanks for the debug suggestion.

    I load a local html is fast if the html is like

    <h1>My First Heading</h1>

    <p>My first paragraph.</p>

    Except the complexity of HTML file, no other clue is found.

  • My Qt debug build opens google in under one second...

Log in to reply