| From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | headerscheck ccache support |
| Date: | 2025-11-21 10:48:10 |
| Message-ID: | b49e74d4-3cf9-4d1c-9dce-09f75e55d026@eisentraut.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Currently, headerscheck and cpluspluscheck are very slow, and they
defeat use of ccache. I have fixed that, and now they are much faster. :-)
The problem was (I think) that the test files are created in a
randomly-named directory (`mktemp -d /tmp/$me.XXXXXX`), and this
directory is named on the compiler command line, which is part of the
cache key.
My solution is to create the test files in the build directory. For
example, for src/include/storage/ipc.h I generate
headerscheck_src_include_storage_ipc_h.c (or .cpp)
Now ccache works. (And it's also a bit easier to debug everything with
this naming.)
The observed speedup on Cirrus CI for headerscheck plus cpluspluscheck
is from about 1min 20s to only 20s. In local use, the speedups are similar.
(I noticed that on Cirrus CI, the first uncached run with this patch was
quite a bit slower. I don't know if this was because of the additional
cache population that was happening, or if it was a fluke. Maybe others
can try it in their environments. Maybe it's not a problem in the long
run.)
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-headerscheck-ccache-support.patch | text/plain | 2.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2025-11-21 11:11:38 | change default default_toast_compression to lz4? |
| Previous Message | Shlok Kyal | 2025-11-21 10:13:00 | Re: How can end users know the cause of LR slot sync delays? |