Bug 72197

Summary: site triggers explosive memory consumption (regression)
Product: [Applications] konqueror Reporter: Dik Takken <kde>
Component: khtmlAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: critical    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Dik Takken 2004-01-08 23:41:53 UTC
Version:            (using KDE KDE 3.1.94)
Installed from:    Compiled From Sources
OS:          Linux

Please run 'top' and visit the following site:

http://home.tiscali.nl/staarink/fotosnieuwjaarsreceptie.html

It is a simple site showing some images. Don't scroll it, just let it load. You will see that X memory usage goes from the normal 20 MB resident data to about 90 MB, while the konqueror process uses about 30 MB. Now slowly scroll the site from top to bottom. While you do this, you will see that memory consumption of X goes up to 100 MB and consumption of konqueror goes up to 90 MB. A total memory usage of almost 200 MB!

For reference: If you do this on KDE 3.1.0, the maximum memory usage (X+Konq) is about 50 MB.

This behavior suggests that both X and Konqueror are holding copies of the images on the site. 
I suspect this is a bug?
Comment 1 Stephan Kulow 2004-01-14 15:08:11 UTC
I can't reproduce a problem on that page
Comment 2 FACORAT Fabrice 2004-01-14 18:57:20 UTC
try with this one on both kde 3.1.x and kde 3.2 : http://linux-wizard.tuxfamily.org/bugs/test4.html

on kde 3.2 see what happen each time you refresh the page ( increase in memory usage )
Comment 3 Dik Takken 2004-01-14 19:06:58 UTC
> try with this one on both kde 3.1.x and kde 3.2

My bug is not about a memory leak. It just uses insane amounts of memory to display the page once. 

Maybe you should add your case to Bug 67705, this is another report about a big memory leak in Konqueror.
Comment 4 Dirk Mueller 2004-01-14 20:32:09 UTC
bug exists, and I have a patch.
Comment 5 Stephan Kulow 2004-01-14 21:12:10 UTC
this hits on every page that reloads
Comment 6 Dirk Mueller 2004-01-14 21:43:41 UTC
Subject: kdelibs/khtml [POSSIBLY UNSAFE]

CVS commit by mueller: 

fix uncachable object leak
CCMAIL: 72197-done@bugs.kde.org


  M +4 -0      ChangeLog   1.158
  M +12 -11    khtml_part.cpp   1.959
  M +3 -3      khtmlimage.cpp   1.40
  M +1 -1      khtmlview.cpp   1.607
  M +1 -1      dom/html_document.cpp   1.40
  M +2 -2      ecma/kjs_dom.cpp   1.168
  M +3 -3      html/htmltokenizer.cpp   1.285
  M +263 -538  misc/loader.cpp   1.165 [POSSIBLY UNSAFE: qDebug]
  M +25 -76    misc/loader.h   1.64
  M +4 -4      misc/seed.h   1.3
  M +2 -2      rendering/render_frames.cpp   1.175
  M +5 -5      xml/dom_docimpl.cpp   1.268
  M +5 -5      xml/dom_docimpl.h   1.122



Comment 7 Dik Takken 2004-01-15 00:56:19 UTC
Ehm, there's some confusion here.. Who fixed what problem? Is Stephan talking about this bug or Bug 67705? This bugreport is not about reloading pages, Bug 67705 is.
Comment 8 Dik Takken 2004-01-21 12:55:51 UTC
I have just compiled KDE 3.2 RC1, and I can still reproduce this bug. I guess the fix didn't make it for RC1?