| From: | Bruce Momjian <bruce(at)momjian(dot)us> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | PostgreSQL-development <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: 10% drop in code line count in PG 17 |
| Date: | 2025-11-19 20:34:55 |
| Message-ID: | aR4p73awIr3pqvtf@momjian.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Nov 19, 2025 at 03:21:33PM -0500, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > While working on a talk, I studied the number of code line changes in
> > each major release, and found PG 17 surprisingly reduced code line count
> > by 10%. To get the code line count, I used /pgtop/src/tools/codelines,
> > which runs:
>
> > find . -name '*.[chyl]' | xargs cat| wc -l
>
> > Any ideas on the cause of this decrease?
>
> My first thought was that it had to do with the conversion of
> src/backend/nodes/ to be largely auto-generated code. If you
> are using codelines against just what is in git, that would look
> like a decrease. However, I see that came in during v16 not v17,
> so that's not the explanation. I'm betting it's some similar
> effect though: code getting moved out of the set of files that
> will match '*.[chyl]'.
Huh.
> Also ... are you in fact counting only what is in git? Because
> I get different answers:
>
> $ git clean -dfxq
> $ git checkout REL_17_0
> HEAD is now at d7ec59a63d7 Stamp 17.0.
> $ src/tools/codelines
> 1664472
> $ git checkout REL_16_0
> HEAD is now at c372fbbd8e9 Doc: fix release date in release-16.sgml.
> $ src/tools/codelines
> 1595197
No, I just followed the shell comment I wrote above the 'find' command
shown above:
# This script is used to compute the total number of "C" lines in the
# release This should be run from the top of the Git tree after a 'make
# distclean'
And that tree has been built many times. Should I change my procedure?
--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com
Do not let urgent matters crowd out time for investment in the future.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas Munro | 2025-11-19 20:49:14 | Re: PRI?64 vs Visual Studio (2022) |
| Previous Message | Tom Lane | 2025-11-19 20:21:33 | Re: 10% drop in code line count in PG 17 |