Hi,
I had a closer look at pygccxml to see how caching works. As I still
have a couple of performance issues with the current file cache I'm
planning on implementing a new cache class that splits its data among
several files instead of one big monolithic file.
While inspecting the sources I have found some kind of bug. The update()
method of the cache class has an argument "included_files" which I
believe should contain the names of the header files that were included
in the actual header file "source_file". There's no comment or something
that says what type "included_files" should be, but from looking at the
code it seems the cache class is treating this like a list of header
names. However, what it actually receives is a dictionary that has the
file names as value. With the current code, the cache class only
inspects the keys of that dictionary (which just contains things like
"f0", "f1", ...) and ignores the file names. This leads to a signature
list that only contains None values and modifications to the header
files will never be noticed.
I suppose the actual bug is in the __parse_gccxml_created_file() method
(in the source_reader_t class) as this method returns the files as
dictionary whereas it should probably rather return
"list(files.itervalues())" instead of just "files".
As I have concentrated on the caching stuff I don't know if any other
parts of the code use the result of __parse_gccxml_created_file(). So
the question now is just if included_files should actually be a dict or
a list?
- Matthias -
|