Bug 112231 - Konqueror has low performance on some pages
Summary: Konqueror has low performance on some pages
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml renderer (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-08 14:10 UTC by Michal Vyskocil
Modified: 2006-08-19 13:01 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Vyskocil 2005-09-08 14:10:27 UTC
Version:            (using KDE KDE 3.4.1)
Installed from:    Gentoo Packages

Konqueror has a performance problem on some pages on Czech Linux portal abclinuxu.cz. Majority of pages has no problem, but there are some strange:

http://www.abclinuxu.cz/forum/show/92887
http://www.abclinuxu.cz/forum/show/89011
http://www.abclinuxu.cz/forum/show/77095
http://www.abclinuxu.cz/blog/Yeti/2005/9/7/100663

Reading of this pages in Konqueror is misery. Konqueror has a big cpu load (Athlon XP1500+) and rendering time is too big. But there are some long discussions, which are alright.

http://www.abclinuxu.cz/forum/show/98597
http://www.abclinuxu.cz/forum/show/86774
http://www.abclinuxu.cz/blog/miblog/2005/7/5/93226

I have to use Opera, or Firefox for these pages, but I'd like to use Konqueror everywhere.

This problem has been reported on discussion forum http://www.abclinuxu.cz/forum/show/92934 (czech), but with no result.
Comment 1 Maksim Orlovich 2005-09-08 17:27:53 UTC
hmm, appears to be stuck in some renderer code;   need to re-check on the machine with the debug build, though

0  0xb746c69c in QChar::category () from /opt/kde3.5/lib/libqt-mt.so.3
#1  0xb6455923 in khtml::appendRun () from /opt/kde3.5/lib/libkhtml.so.4
#2  0xb64565dd in khtml::RenderBlock::bidiReorderLine () from /opt/kde3.5/lib/libkhtml.so.4
#3  0xb6459ffd in khtml::RenderBlock::layoutInlineChildren () from /opt/kde3.5/lib/libkhtml.so.4
#4  0xb6461f88 in khtml::RenderBlock::layoutBlock () from /opt/kde3.5/lib/libkhtml.so.4
#5  0xb64624e1 in khtml::RenderBlock::layout () from /opt/kde3.5/lib/libkhtml.so.4
#6  0xb6461b0e in khtml::RenderBlock::layoutBlockChildren () from /opt/kde3.5/lib/libkhtml.so.4
#7  0xb646220f in khtml::RenderBlock::layoutBlock () from /opt/kde3.5/lib/libkhtml.so.4
#8  0xb64624e1 in khtml::RenderBlock::layout () from /opt/kde3.5/lib/libkhtml.so.4
#9  0xb6461b0e in khtml::RenderBlock::layoutBlockChildren () from /opt/kde3.5/lib/libkhtml.so.4
#10 0xb646220f in khtml::RenderBlock::layoutBlock () from /opt/kde3.5/lib/libkhtml.so.4
#11 0xb64624e1 in khtml::RenderBlock::layout () from /opt/kde3.5/lib/libkhtml.so.4
#12 0xb6461b0e in khtml::RenderBlock::layoutBlockChildren () from /opt/kde3.5/lib/libkhtml.so.4
#13 0xb646220f in khtml::RenderBlock::layoutBlock () from /opt/kde3.5/lib/libkhtml.so.4
#14 0xb64624e1 in khtml::RenderBlock::layout () from /opt/kde3.5/lib/libkhtml.so.4
#15 0xb6461b0e in khtml::RenderBlock::layoutBlockChildren () from /opt/kde3.5/lib/libkhtml.so.4
#16 0xb646220f in khtml::RenderBlock::layoutBlock () from /opt/kde3.5/lib/libkhtml.so.4
#17 0xb64624e1 in khtml::RenderBlock::layout () from /opt/kde3.5/lib/libkhtml.so.4
#18 0xb6461b0e in khtml::RenderBlock::layoutBlockChildren () from /opt/kde3.5/lib/libkhtml.so.4
#19 0xb646220f in khtml::RenderBlock::layoutBlock () from /opt/kde3.5/lib/libkhtml.so.4
#20 0xb64624e1 in khtml::RenderBlock::layout () from /opt/kde3.5/lib/libkhtml.so.4
#21 0xb6461b0e in khtml::RenderBlock::layoutBlockChildren () from /opt/kde3.5/lib/libkhtml.so.4
#22 0xb646220f in khtml::RenderBlock::layoutBlock () from /opt/kde3.5/lib/libkhtml.so.4
#23 0xb64624e1 in khtml::RenderBlock::layout () from /opt/kde3.5/lib/libkhtml.so.4
#24 0xb645db6e in khtml::RenderBlock::collapseMargins () from /opt/kde3.5/lib/libkhtml.so.4
#25 0xb6461b23 in khtml::RenderBlock::layoutBlockChildren () from /opt/kde3.5/lib/libkhtml.so.4
#26 0xb646220f in khtml::RenderBlock::layoutBlock () from /opt/kde3.5/lib/libkhtml.so.4
#27 0xb64624e1 in khtml::RenderBlock::layout () from /opt/kde3.5/lib/libkhtml.so.4
#28 0xb6461b0e in khtml::RenderBlock::layoutBlockChildren () from /opt/kde3.5/lib/libkhtml.so.4
#29 0xb646220f in khtml::RenderBlock::layoutBlock () from /opt/kde3.5/lib/libkhtml.so.4
#30 0xb64624e1 in khtml::RenderBlock::layout () from /opt/kde3.5/lib/libkhtml.so.4
#31 0xb645db6e in khtml::RenderBlock::collapseMargins () from /opt/kde3.5/lib/libkhtml.so.4
#32 0xb6461b23 in khtml::RenderBlock::layoutBlockChildren () from /opt/kde3.5/lib/libkhtml.so.4
#33 0xb646220f in khtml::RenderBlock::layoutBlock () from /opt/kde3.5/lib/libkhtml.so.4
#34 0xb64624e1 in khtml::RenderBlock::layout () from /opt/kde3.5/lib/libkhtml.so.4
#35 0xb6461b0e in khtml::RenderBlock::layoutBlockChildren () from /opt/kde3.5/lib/libkhtml.so.4
#36 0xb646220f in khtml::RenderBlock::layoutBlock () from /opt/kde3.5/lib/libkhtml.so.4
#37 0xb64624e1 in khtml::RenderBlock::layout () from /opt/kde3.5/lib/libkhtml.so.4
#38 0xb645db6e in khtml::RenderBlock::collapseMargins () from /opt/kde3.5/lib/libkhtml.so.4
#39 0xb6461b23 in khtml::RenderBlock::layoutBlockChildren () from /opt/kde3.5/lib/libkhtml.so.4
Comment 2 trekker 2005-09-09 05:32:42 UTC
The same problem occurs in version 3.3.2 on Debian Testing
Comment 3 kavol 2005-09-09 15:36:33 UTC
I can confirm, Konqueror 3.4.2 on Mandriva 2006 beta
Comment 4 David Watzke 2005-12-03 20:12:01 UTC
Same on Konqueror 3.5.0 @ Gentoo 2005.1
Comment 5 Marijn Schouten 2006-01-25 18:44:41 UTC
i didn't have any problems on the first link ( http://www.abclinuxu.cz/forum/show/92887), but I confirm for the second (http://www.abclinuxu.cz/forum/show/89011) on Konqueror 3.5 on KDE 3.5.0 using Gentoo
Comment 6 Robert Kratky 2006-02-07 14:52:32 UTC
Konq. 3.5.1 -- same thing.
Comment 7 kavol 2006-02-08 11:28:43 UTC
With Konqueror 3.5 on Mandriva ...

http://www.abclinuxu.cz/forum/show/92887 - shows empty window (tab) for several seconds with CPU at 100%

http://www.abclinuxu.cz/forum/show/89011 - Konqueror freezes for several minutes with CPU at 100%

http://www.abclinuxu.cz/forum/show/77095 - same as the first

http://www.abclinuxu.cz/blog/Yeti/2005/9/7/100663 - the link does not work
Comment 8 Robert Kratky 2006-02-08 11:39:55 UTC
> http://www.abclinuxu.cz/blog/Yeti/2005/9/7/100663 - the link does not work 

Well, it doesn't work in any browser. Not really a Konq. problem...
Comment 9 Marijn Schouten 2006-03-05 17:03:32 UTC
http://en.wikipedia.org/wiki/Wikipedia:Babel

cpu at 100% and Konqueror is very non-snappy. 
Comment 10 Allan Sandfeld 2006-05-19 23:12:00 UTC
At least the last wikipedia.org link is caused by some extremely expensive calls to QFontMetrics::width()
Comment 11 Germain Garand 2006-06-18 21:25:09 UTC
SVN commit 552677 by ggarand:

avoid triggering a cascade of pointless relayouts when invalidating floats.

BUG: 112231


 M  +2 -2      render_block.cpp  
 M  +3 -1      render_object.cpp  


--- branches/KDE/3.5/kdelibs/khtml/rendering/render_block.cpp #552676:552677
@@ -1221,7 +1221,7 @@
         // change (because it has more available line width).
         // So go ahead and mark the item as dirty.
         child->setChildNeedsLayout(true);
-    if (child->hasFloats())
+    if (!child->flowAroundFloats() && child->hasFloats())
         child->markAllDescendantsWithFloatsForLayout();
     if (child->containsPageBreak())
         child->setNeedsLayout(true);
@@ -2420,7 +2420,7 @@
 
 void RenderBlock::markAllDescendantsWithFloatsForLayout(RenderObject* floatToRemove)
 {
-    setNeedsLayout(true);
+    setChildNeedsLayout(true);
 
     if (floatToRemove)
         removeFloatingObject(floatToRemove);
--- branches/KDE/3.5/kdelibs/khtml/rendering/render_object.cpp #552676:552677
@@ -1531,8 +1531,10 @@
             p = p->containingBlock();
         }
 
-        if (outermostBlock)
+        if (outermostBlock) {
+            outermostBlock->setNeedsLayout(true);
             outermostBlock->markAllDescendantsWithFloatsForLayout(this);
+        }
     }
 
     if (isPositioned()) {
Comment 12 Germain Garand 2006-06-20 18:23:13 UTC
SVN commit 553287 by ggarand:

a tad safer version repaint wise, of #112231 fix.
not sure if it matters, just not taking the chance.

CCBUG: 112231


 M  +1 -0      render_block.cpp  
 M  +1 -3      render_object.cpp  


--- branches/KDE/3.5/kdelibs/khtml/rendering/render_block.cpp #553286:553287
@@ -2420,6 +2420,7 @@
 
 void RenderBlock::markAllDescendantsWithFloatsForLayout(RenderObject* floatToRemove)
 {
+    dirtyFormattingContext(false);
     setChildNeedsLayout(true);
 
     if (floatToRemove)
--- branches/KDE/3.5/kdelibs/khtml/rendering/render_object.cpp #553286:553287
@@ -1531,10 +1531,8 @@
             p = p->containingBlock();
         }
 
-        if (outermostBlock) {
-            outermostBlock->setNeedsLayout(true);
+        if (outermostBlock)
             outermostBlock->markAllDescendantsWithFloatsForLayout(this);
-        }
     }
 
     if (isPositioned()) {
Comment 13 Marijn Schouten 2006-08-19 11:35:11 UTC
Yeah, this seems to be fixed in konqueror 3.5.4 :D 
Comment 14 Michal Vyskocil 2006-08-19 13:01:24 UTC
Yes, Konqueror 3.5.4 works fine :-). Many thanks for your great work!