[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KHTML memory usage.
From:       Thiago Macieira <thiago () kde ! org>
Date:       2005-06-17 19:25:58
Message-ID: 200506171626.59374.thiago () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Oliver Stieber wrote:

You've forgotten a few steps:

>1: The HTML is downloaded.
>2: The HTML is parsed and converted into some internal
>structure that provides more regular faster access. in
>the case of HTML this would be the dom tree. The DOM
>tree may actually be smaller than the original HTML
>because tag names get replaced with objects.

2b: CSS stylesheets are downloaded and parsed into memory

>3: The layout engine then uses the DOM tree to
>generate a page layout, I usually keep line and block
>information in the layout for performance that you
>wouldn't expect to find in the DOM tree.
>4: A number of QT GUI objects are then created to
>layout the page.
>5: Images are downloaded in a compressed format, and
>converted into uncompressed RGB QT images, and
>possibly also XBitmaps.

6: JavaScripts are downloaded and run, which means that the tree ayout and 
stylesheets may change.
7. Plugins are downloaded and run.

>I am trying to ascertain if it is worth my while
>dropping the elements in 3 4 and 5 when memory becomes
>scarce and recreating then again when the user
>requires them.
>

Step #6 invalidates your idea of discarding #3 and #4, because you're not 
allowed to re-run the script. If you did, the result could be different, 
even if it is possible at all.

Step #7 also poses a problem because plugins are external processes. 
Unless there's a well defined API to tell it to go into "power-save 
mode", there's nothing to be done. In fact, even placing the plugin 
process (nspluginviewer) to sleep is not an easy decision.

Finally, you should be discussing this on kfm-devel, not kde-devel. You 
seem to have a lot of ideas, and ideas are always welcome. What you need 
now is to discuss them with people more familiar with the internals to 
see if it is possible to do what you want.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

2. Tó cennan his weorc gearu, ymbe se circolwyrde, wearð se cægbord and se 
leohtspeccabord, and þa mýs cómon lator. On þone dæg, he hine reste.

[Attachment #5 (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic