WebkKitGTK is very slow when rendering a simple page with 20K lines. It seems it's parsed quickly, but the rendering engine makes it down to knees. I can reproduce the slowness both with webkit1 (webkitgtk3-2.4.8-2.fc21.x86_64) and webkit2 (webkitgtk4-2.6.5-3.fc21.x86_64).
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.