* addons: Reduce memory consumption
Parse dump files incrementaly using ElementTree.iterparse. Clean unused
resources during parsing. This method is explained in following
article: https://www.ibm.com/developerworks/xml/library/x-hiperfparse/
Memory consumption was reduced about 30% (measured with mprof),
execution time increased about 5% (measured with time utility).
More description available in PR.
* Switch to lxml and update iterparse routines
Use lxml module instead default xml.etree. Lxml provides convenient
wrappers around iterparse method that accepts `tag` argument. That
easer incremental parsing routines to select specific tags from roottree
like `dump` and `dumps`.
Element.clear() method was replaced by `lxml_clean` because lxml
keeps additional information to nodes that should be removed.
Added note about large consumption RAM on large dump files.
This commit doesn't solve this problem completely, but provides a way
to improve current parser to add incremental Configuration serialization
later.
* Working on iterative parser
* Added iterative Configurations parser
* fix
* Fix varlist iteration
* make sure that standards node was loaded
Use Python 3 instead of Python 2 if addons are executed directly.
Running cert.py and misra.py against test/cfg/std.c.dump shows that
Python 3 needs only half the time compared to Python 2. I have tested
it repeatedly and the results are always the same. This is no surprise
at all. The memory footprint is very likely also significantly better
but i have not tested it.
* make ellipsis ... a single token
Using cppcheck -E to preprocess code with ellipsis produces output that
can't be compiled because ... is split into 3 tokens.
* try to fix addon
* added CLion project folder to .gitignore
* adjusted project name in CMakeLists.txt
* avoid warning when compiling "Debug" with Visual Studio via CMake
There was a GCC-style compiler flag in the common flags in compileroptions.cmake which caused the following warning:
cl : Command line warning D9002 : ignoring unknown option '-O0'
* compileroptions.cmake: restored original formatting
* some small *.py script cleanups