What are MonoDevelop's .pidb files?

两盒软妹~` 提交于 2019-11-27 17:05:04

问题


MonoDevelop creates those for every project. Should I include them in source control?


回答1:


From a MonoDevelop blog post:

There were several long time pending bug reports, and I also wanted to improve a bit the performance and memory use. MonoDevelop creates a Parser Information Database (pidb) file for each assembly or project. This file contains all the information about classes implemented in an assembly, together with documentation pulled from Monodoc. A pidb file has trhee sections: the first one is a header which contains among other things the version of the file format (that version is checked when loading the pidb, and the file will be regenerated if it doesn't match the current implementation version). The second section is the index of the pidb file. It contains an index of all classes in the database. The index is always fully loaded in memory to be able to quickly locate classes. The third section of the file contains all the class information: list of methods, fields, properties, documentation for each of those, and so on. Each entry in the index has a file offset field, which can be used to completely load all the information of a class (the index only contains the name).

So it sounds like it's really just an optimization. I would personally not include it in source control unless you find it makes a big difference to performance: my guess is it will only really stay valid if only one person is working on the project at a time. (If it's big and changes regularly, you could find it adds significant overhead to the repository too. I haven't checked to see what the size is actually like, but it's worth checking.)




回答2:


They're just cached code completion data. As the post Jon linked explains, the main reason is to save memory, though they do also save you from waiting for MD to parse all the source files and referenced assemblies when you open a project.

The pidb files can be regenerated pretty quickly, so there's no advantage to keeping them in the VCS. Indeed, as well as the VCS repository overhead, it could also cause problem if people are using different versions of MD with different pidb formats, so I'd strongly recommend against keeping them in source control.



来源:https://stackoverflow.com/questions/1022111/what-are-monodevelops-pidb-files

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!