[PATCH] D21157: [pdb] Improve StreamInterface to support writing

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 9 10:44:55 PDT 2016


zturner added a comment.

In http://reviews.llvm.org/D21157#453549, @ruiu wrote:

> Although I agree with you that this is good for testing and completeness is generally good, but how about runtime performance? Updating read buffers incurs runtime cost and hence slows down PDB file generation. The most important thing for the linker is performance, and the current good number comes from the fact that we just do less instead of doing everything efficiently. If we add too much to the PDB reader/writer library beforehand, we risk the usability of the library for the linker. Aiming completeness is not always a win.
>
> Being said that, the most difficult point of PDB reading/writing is to understand the format, so once we get a complete picture, it should be much easier to speed it up (by eliminating features or whatever) or write another one. So I think it's your call. If this helps creating PDB and help us understand the PDB as a file format (I guess it is), it's probably a good change.


Yea, I agree we will want to be careful of performance.  I think if it's a problem then we can rename `MappedBlockStream` to `ReadWritePdbStream` and then make a `WriteOnlyPdbStream` that doesn't do any of this and has none of the caching logic at all.  I think we have enough extensibility points to get the performance we need, but I guess we don't know until we try.  Worst case scenario I guess we have a second codepath for writing, but at least with all the testing we will understand the format.  I'm hoping we can reuse though.


http://reviews.llvm.org/D21157





More information about the llvm-commits mailing list