Review Request: use union in PrimaryExpressionAST to reduce memory footprint

Aleix Pol Gonzalez aleixpol at gmail.com
Thu Mar 1 11:11:37 UTC 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104127/#review11048
-----------------------------------------------------------


This code has been sitting in our codebase for quite longtime and even though it's well tested, we already knew that there were issues (roberto said that in many occasions). I'm interested in knowing what David thinks about such a patch, but it made sense to me and I think we can really use some improvements in this area.

I'm fine with having this code in master to have it properly tested.

- Aleix Pol Gonzalez


On March 1, 2012, 2:41 a.m., Milian Wolff wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104127/
> -----------------------------------------------------------
> 
> (Updated March 1, 2012, 2:41 a.m.)
> 
> 
> Review request for KDevelop and David Nolden.
> 
> 
> Description
> -------
> 
> On 64bit sizeof(PrimaryExpressionAST) == 64, but with this patch it reduces to 40 by using a union + enum.
> 
> The code-handling is a bit changed, but well... is this OK to land in master?
> 
> This is another step towards a reduced memory consumption for the test file in https://bugs.kde.org/show_bug.cgi?id=291248 with this patch the consumption goes down by ~200mb for the given test file
> 
> 
> Diffs
> -----
> 
>   languages/cpp/cppduchain/expressionvisitor.cpp 0ef76a6 
>   languages/cpp/parser/ast.h 46ecac7 
>   languages/cpp/parser/codegenerator.cpp 962fe5b 
>   languages/cpp/parser/default_visitor.cpp 174e5d9 
>   languages/cpp/parser/parser.cpp 50c09a8 
> 
> Diff: http://git.reviewboard.kde.org/r/104127/diff/
> 
> 
> Testing
> -------
> 
> all unit tests pass
> 
> 
> Thanks,
> 
> Milian Wolff
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20120301/80016b95/attachment.html>


More information about the KDevelop-devel mailing list