Created attachment 54792 [details] Demonstration Loading this page (http://fr.kingofsat.net/pos-13E.php) and any of this site is MUCH longer on Windows than on Linux. When loading on Windows it takes about 7~8 seconds, takes 100%cp and freezes sometimes for a few seconds. At the contrary on Linux it only takes 3~4 seconds. The same page loads fast on Konqueror and Chrome but is also problematic on Aurora. Even if I try to load this page in Widget-less application the problem is the same. Please find attached a little demonstration : it load the page and then warn about the time it took. Tested with QT 4.6 and QT 4.7, under Windows 7 Pro 64 bits, Windows Vista Home 32 bits, Windows Xp Pro 32 bits and Linux Kubuntu 9.10 64 bits Thanks to investigate
I have made one other test : I have copied the contents of the page that is slow to load in a file. Then I use QFile to load the contents and setHtml to fill the WebPage with the contents. And the problem is still here, twice faster on Linux than on Windows. It seems that the problem is in the way this page is interpreted. Thanks
*** This bug has been marked as a duplicate of bug 31719 ***
Not a duplicate if you can reproduce the issue with the beta of Qt 4.7. Could you please attach a profile on Windows?
I am able to reproduce the problem with 4.7 technical preview, I have not tested with the beta.
(In reply to comment #4) > I am able to reproduce the problem with 4.7 technical preview, I have not > tested with the beta. Ok, the "technical preview" still have the old WebKit. Please try with a recent WebKit then (WebKit trunk for example).
I have just tested with 4.7 beta and it is not solved in that version. I will try the latest qtwebkit if I find out how to install it (I don't want to compile the whole qt libraries)
(In reply to comment #6) > I have just tested with 4.7 beta and it is not solved in that version. I will > try the latest qtwebkit if I find out how to install it (I don't want to > compile the whole qt libraries) Here it is: http://trac.webkit.org/wiki/BuildingQtOnWindows A profile would be welcome. We are aware of slowness with fonts layout on Windows.
OK I'll try to build latest qtwebkit as from what I can see on the jounral, the 31719 as only be included in this week's release. But I thought I could use the latest version by downloading the binary. I don't understand what you mean with "profile". Thanks
(In reply to comment #8) > I don't understand what you mean with > "profile". You can run your example in your favorite profiler and send the list of function used ordered by time spent in them.
(In reply to comment #9) > You can run your example in your favorite profiler and send the list of > function used ordered by time spent in them. I had a look on Linux. Most of the time is spend loading the resources. CPU wise, a ridiculous amount of time is spent in layouting of the text. But time-wise, 99% of the time is spend loading the images of the page.
Created attachment 55371 [details] Profile
I have attached the profile established on Windows 7 x64 with Qt 4.7 beta1
(In reply to comment #12) > I have attached the profile established on Windows 7 x64 with Qt 4.7 beta1 Could you please upload a text file with the result instead? The file you sent depends on the exact binary that was used to generate it. You can use the command gprof to generate the results.
Adding Jocelyn and Andreas to the bug report.
Created attachment 55372 [details] Flat profile and call graph I am not sure if this is relevant as every call is 0% of time
(In reply to comment #15) > I am not sure if this is relevant as every call is 0% of time Hum, not, that is not a correct profile. Jocelyn, what do you use on Windows? Note that you have qt_noop() in the function list, so either you have a problem with your compiler, or you are running a debug build. If the latter, you should start by testing in release mode.
Sorry, I have never used a profiler on Windows (I use Valgrind under Linux). I have seen here http://www.qtcentre.org/wiki/index.php?title=Profiling_with_GNU_gprof that I had to build it in debug.
(In reply to comment #16) > Hum, not, that is not a correct profile. > Jocelyn, what do you use on Windows? > I couldn't get any decent profiler work with webkit on my windows 7 64 machine without crashing. I should try again with JIT disabled some day. I ended up using poor man sampling profilers like VerySleepy or ProcessMonitor. (In reply to comment #0) The problem is that Windows fonts contains OpenType layout information and they don't on Linux. When a font of this type is encountered a different path is taken in text rendering taking near twice as much time. I don't know if any mandatory process is done in this path for regular fonts like Arial on Windows. Maybe it would be possible to skip it in some case even if the font reports supporting it. Implementing in QtWebKit the "fast path" for regular ascii files that other ports did would also help, however this can't be done short term.
I haven't been unable to compile latest webkit trunk. After two hours of compilation, I've got a few linking errors with undefined references. Anyway, Using Qt 4.7 beta1 I can notice improvements since 4.6.2 but still not as fast as on Linux. In fact, I do not display the webpages, they are just parsed. So maybe the font problem could be avoided.
(In reply to comment #19) > I do not display the webpages, they are just parsed. So maybe the font problem could be avoided. You probably need the layout of the page to be valid? If yes, WebKit need to find the width of each words to break the text in block and this require some "heavy" computation with the fonts.
All I need is the source code and to be able to use QWebElement
(In reply to comment #18) > I couldn't get any decent profiler work with webkit on my windows 7 64 machine without crashing. I should try again with JIT disabled some day. > I ended up using poor man sampling profilers like VerySleepy or ProcessMonitor. Jocelyn, have you seen my latest comments on bug 31719? I've attached some detailed profile data there created with the AQtime profiler.