Monday, July 21, 2014

Code size

Someone was just talking about the size of some source files in PostgreSQL. The source code (.c, .h, .y and .l files) weighs in at a bit over 1 million lines of code. The documentation source has another roughly 300,000 lines. That's a large project, but by no means enormous by today's standards. The biggest source code file is pg_dump.c, at around 15,700 lines. The biggest documentation file is funcs.sgml, at around 17,600 lines. Both of these might well do with a bit of reorganization.

1 comment:

  1. Here is a method to get those results:
    $ git ls-files "*.[c|h|y|l]" | xargs wc -l | tail -n1
    1074351 total
    $ git ls-files "*.sgml" | xargs wc -l | tail -n1
    306369 total