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

List:       kdevelop-devel
Subject:    Re: On Memory consumption of KDevelop-PG
From:       Alexander Dymo <alexander.dymo () gmail ! com>
Date:       2009-12-19 16:36:59
Message-ID: 200912191836.59761.alexander.dymo () gmail ! com
[Download RAW message or body]

субота, 19-гру-2009 11:49:47 Andreas Pakulat ви написали:
> IMHO its no big deal if the parser needs some 200M for parsing a single
> file as long as afterwards the memory is free again for re-use. In
> particular it must not be fragmented (which should already work due to
> usage of the memory pool). For how to make the AST smaller see further
> down on your "compress the AST" question.

Well, but now huge parser memory consumption is an issue (at least for C++). I 
have 3.5M C file which is parsed into 550M AST. 
550M isn't that small amount of memory...

And that's just one file. Try parsing Ruby language sources - you'll end up 
using 3G of memory for parsing. That's definitely wrong. Not everybody has 
this much of memory.

There're actually bugs in c++ parser where it creates AST nodes which aren't 
used (added to the tree). I have a patch (not public yet, still breaks some 
duchain tests) for that which reduces the memory consumption in my test case 
from 550M to 400M. But that's all I can do without doing AST compression or 
removing members from AST classes.

-- 
KDevelop-devel mailing list
KDevelop-devel@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel

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

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