What I ended up doing is:
creating a temporary file with a list of #include "header_path" then
constructing the module_builder_t with this file.
I first tried with create_text_fc but if you do that, in all the cpp
files generated by py++ , you won't get any include, so nothing will
compile.
The only weird thing now is that in all the cpp files, they all
include this temp file, so I need to keep this temp file for building.
I didn't know this create_cached_source... I'll try that to see if
that solves my problem.
I remember I tried the cache=cache_file_path option to
module_builder_t constructor, but it was not helping at all.
Each time the cache file was read, then recreated, and the generation
time was almost the same as without any cache.
Le 1 avril 2010 17:27, Roman Yakovenko <rom...@gm...> a écrit :
> 2010/4/1 Benoît Leveau <ben...@gm...>:
>> Hi all,
>
> Good evening.
>
>> There's something that's driving me mad, and I'm sure it's really
>> basic or simple to fix.
>> I have a big project to bind and parsing all the files takes a lot of
>> time, and finally hit the 8GB point at which I prefer to kill the
>> process.
>
> Take a look on "pygccxml.parser.project_reader.create_cached_source_fc(header,
> cached_source_file)" function (
> http://language-binding.net/pygccxml/apidocs/parser.html )
>
> It will allow you to save gccxml compilation time.
>
> If you can send me( privatly ) gccxml generated file, I can try to
> improve py++/pygccxml performance.
>
>> In the "Best practices" page, it is suggested to "Create one header
>> file, which will include all project header files."
>
> pygccxml is able to merge results from different gccxml invocation,
> but from my experience it will take more time and memory.
>
> Did you include all your projects in that file or a single one? Ogre
> 3D engine is pretty big project, but even it doesn't consumes so much
> memory.
>
> --
> Roman Yakovenko
> C++ Python language binding
> http://www.language-binding.net/
>
|