WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
38386
[Qt] QWebView::load performance issue on Windows compared to Linux
https://bugs.webkit.org/show_bug.cgi?id=38386
Summary
[Qt] QWebView::load performance issue on Windows compared to Linux
Guillaume LACHAUD
Reported
2010-04-30 04:45:36 PDT
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
Attachments
Demonstration
(357.86 KB, application/x-zip-compressed)
2010-04-30 04:45 PDT
,
Guillaume LACHAUD
no flags
Details
Profile
(176.71 KB, application/octet-stream)
2010-05-07 07:18 PDT
,
Guillaume LACHAUD
no flags
Details
Flat profile and call graph
(7.49 KB, text/plain)
2010-05-07 07:29 PDT
,
Guillaume LACHAUD
no flags
Details
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Guillaume LACHAUD
Comment 1
2010-05-04 15:27:01 PDT
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
Guillaume LACHAUD
Comment 2
2010-05-07 04:51:39 PDT
*** This bug has been marked as a duplicate of
bug 31719
***
Benjamin Poulain
Comment 3
2010-05-07 05:02:38 PDT
Not a duplicate if you can reproduce the issue with the beta of Qt 4.7. Could you please attach a profile on Windows?
Guillaume LACHAUD
Comment 4
2010-05-07 05:12:25 PDT
I am able to reproduce the problem with 4.7 technical preview, I have not tested with the beta.
Benjamin Poulain
Comment 5
2010-05-07 05:47:32 PDT
(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).
Guillaume LACHAUD
Comment 6
2010-05-07 06:17:34 PDT
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)
Benjamin Poulain
Comment 7
2010-05-07 06:21:06 PDT
(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.
Guillaume LACHAUD
Comment 8
2010-05-07 06:41:37 PDT
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
Benjamin Poulain
Comment 9
2010-05-07 06:56:01 PDT
(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.
Benjamin Poulain
Comment 10
2010-05-07 07:01:37 PDT
(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.
Guillaume LACHAUD
Comment 11
2010-05-07 07:18:25 PDT
Created
attachment 55371
[details]
Profile
Guillaume LACHAUD
Comment 12
2010-05-07 07:18:56 PDT
I have attached the profile established on Windows 7 x64 with Qt 4.7 beta1
Benjamin Poulain
Comment 13
2010-05-07 07:23:54 PDT
(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.
Benjamin Poulain
Comment 14
2010-05-07 07:24:41 PDT
Adding Jocelyn and Andreas to the bug report.
Guillaume LACHAUD
Comment 15
2010-05-07 07:29:31 PDT
Created
attachment 55372
[details]
Flat profile and call graph I am not sure if this is relevant as every call is 0% of time
Benjamin Poulain
Comment 16
2010-05-07 07:37:16 PDT
(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.
Guillaume LACHAUD
Comment 17
2010-05-07 07:45:34 PDT
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.
Jocelyn Turcotte
Comment 18
2010-05-10 01:47:47 PDT
(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.
Guillaume LACHAUD
Comment 19
2010-05-10 02:39:22 PDT
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.
Benjamin Poulain
Comment 20
2010-05-10 02:43:10 PDT
(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.
Guillaume LACHAUD
Comment 21
2010-05-10 02:45:12 PDT
All I need is the source code and to be able to use QWebElement
Strahinja Markovic
Comment 22
2010-05-10 05:58:47 PDT
(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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug