| Summary: | [GTK] Slow to render simple page with 20.000 lines | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Milan Crha <mcrha> | ||||||||
| Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||||||
| Status: | RESOLVED WORKSFORME | ||||||||||
| Severity: | Normal | CC: | aperez, bugs-noreply, gustavo, kdwkleung, nekohayo, tpopela | ||||||||
| Priority: | P2 | ||||||||||
| Version: | 420+ | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| See Also: | https://bugzilla.gnome.org/show_bug.cgi?id=743926 | ||||||||||
| Bug Depends on: | |||||||||||
| Bug Blocks: | 245783 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Milan Crha
2015-04-17 02:39:04 PDT
Created attachment 251010 [details]
compressed b.html
This is a test b.html file, which has uncompressed ~4.5MB, but it is otherwise very simple.
Created attachment 251011 [details]
test-wk2.c
This is a simple test program, which looks at the /tmp for the b.html file. Note that the initial view is filled within ~2 seconds (subjectively measured), but the CPU is up at 100% approximately 3-times longer (again subjectively measured).
The first line contains a command to build and run the test program.
(In reply to comment #2) > ..., which looks at the /tmp for the b.html file... Ehm, I didn't save the file before clicking "upload", thus that's not true. Correct the path before compiling. I'm sorry for that. Created attachment 251013 [details]
test-wk2.c
Updated test-wk2.c with measured times.
The webkitgtk4-2.8.1-1.fc22.x86_64 shows these times:
load_changed_cb: WEBKIT_LOAD_STARTED after 0.257252s
load_changed_cb: WEBKIT_LOAD_COMMITTED after 0.268599s
load_changed_cb: WEBKIT_LOAD_FINISHED after 2.59222s
while webkitgtk4-2.6.5-3.fc21.x86_64 shows:
load_changed_cb: WEBKIT_LOAD_STARTED after 0.098319s
load_changed_cb: WEBKIT_LOAD_COMMITTED after 0.101146s
load_changed_cb: WEBKIT_LOAD_FINISHED after 6.49957s
thus you clearly made some improvements already.
I suggest to run the test application under callgrind:
$ G_SLICE=always-malloc valgrind --tool=callgrind --trace-children=yes ./test-wk2
then use a tool like kcachegrind to examine the bottlenecks. I see (with the 2.6.5) 100 and 200 million-times called functions in the web process, which feels like a room for improvements, especially when the HTML document contains only 20K lines with a bit more tags in total.
I didn't run the callgrind with the 4.8.1, it's a virtual machine and there is not enough place for the debug info, without which the callgrind log is useless.
Unable to reproduce in Gnome Web 44.2/ WebKitGTK 2.40.1. Perhaps fixed already? (In reply to kdwkleung from comment #5) > Unable to reproduce in Gnome Web 44.2/ WebKitGTK 2.40.1. Perhaps fixed > already? Same here with ToT and a build from the tip of the 2.40 branch. I think this can be closed. |