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

List:       quanta
Subject:    Re: [Quanta] Re: Quanta CPU usage on large PHP file
From:       Andras Mantia <amantia () kde ! org>
Date:       2005-05-09 21:06:58
Message-ID: 200505100007.05068.amantia () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Monday 09 May 2005 23:00, Linus McCabe wrote:
> On Monday 09 May 2005 09.35, Andras Mantia wrote:
> > Unfortunately the file needs to be reparsed when you switch to it,
> > otherwise Quanta would use too much memory. I mean, the node tree
> > is not kept in the memory for each file, but it is rebuilt when you
> > switch to a file.
>
> How much memory is used here, do you have an estimate? (I'm aware
> file size and complexity matters here...)

Can be several MB per file.
>
> Perhaps rather than implementing a disk cache, you could have an
> option to store the node tree in memory and let the os swap engine
> take care of disk cacheing if needed?

I'm not sure this is good, as in this case your whole system can be 
unresponsible as soon as the os starts to swap the memory. Especially 
if you are low on memory.

> Personally, I usually have only five or six files open, so i doubt it
> would be an issue for me...

It depends also on the size and the content of the document. A PHP 
document with many  { } blocks, comments and such will create a much 
bigger tree than for example a HTML document with the same size.

> Or perhaps keep the latest X node trees in memory, since even if you
> have many files open, you usually work on a few at a time (me, that
> is ;)

But you may switch to other opened ones just to look at the code...
>
> By default then, you'd set X to 1 and you'd have the current
> behaviour. People with too much memory could increase the setting.

I think a general solution  - without a config option - is better. 

Andras
-- 
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org

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

_______________________________________________
Quanta mailing list
Quanta@mail.kde.org
https://mail.kde.org/mailman/listinfo/quanta


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

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