GitTools / GitLink

Making .NET open source accessible!
MIT License
555 stars 86 forks source link

GitLink does not discern what files are really needed to be indexed for native code PDB #203

Open toughengineer opened 6 years ago

toughengineer commented 6 years ago

I tried GitLink to index sources for one of boost DLLs and it shoved a whooping ~60000 (sixty thousand) item index into poor PDB which actually needed only 1000 index items. This is overkill considering there may be tens of DLLs built from a hundred thousand file repo, and for every DLL GitLink would sweep the whole 100000 file repo, while the PDB contains info about exact files that should be indexed. This is unacceptable.

GeertvanHorrik commented 6 years ago

Thanks for the feedback. What do you think would be a good solution ?

toughengineer commented 6 years ago

@GeertvanHorrik, hello. At least sweep only files the particular PDB is referring to. You can get the list of these files, for example, using srctool from Debugging tools for Windows (see my comment in #188 for usage example). This should not be a problem since you are already using pdbstr from that suite. Also you could process PDBs in batches, caching mappings of common files between PDBs. But this ultimately may be practically unnecessary as long as the first thing is implemented. Hope it helps to make this tool better.

raymondwu1 commented 5 years ago

Hi, I recently implemented what @toughengineer suggested and I'm currently just updating/cleaning my branch to prepare for a pull request. I imported version 6.12.2.633 of srctool which is packaged in the same version of Debugging tools for Windows that you guys are currently using for pdbstr. (I included a source in one of my commits) Having tested it internally, it works pretty great. Thanks for the awesome suggested solution.