Repository navigation
mark pgrx_pg_sys bindings inline - #1616
Conversation
Signed-off-by: usamoi <usamoi@outlook.com>
|
Wow. That’s such an improvement that I kinda don’t believe it. Are those both timings with “cargo clean”? |
Yes. |
|
I’m gonna go ahead and merge. Would you mind linking that blog post you linked on discord here in this PR too? |
It's beneficial. |
|
Apparently this came about fromm https://kobzol.github.io/rust/rustc/2024/03/15/rustc-what-takes-so-long.html Specifically this sentence:
|
|
BTW, @usamoi… thanks. This is a huge win. |
|
Ah, this is because of an artifact of rustc that is somewhat dependent on how things currently work, rather than something necessarily true, though I suppose we can always revert it later if things do change significantly. Namely, when a function is |
(cherry-picking that commit caused a number of conflicts due to other drift in the develop branch)
Marking pgrx_pg_sys bindings inline reduces compilation time. It took 150 seconds to build `pgrx` before and it takes 36 seconds to build `pgrx` now. ``` cargo build --no-default-features --features pg13 --release --timings ``` Before this PR:  After this PR:  > The “codegen” times are highlighted in a lavender color. > The “custom build” units are build.rs scripts, which when run are highlighted in orange. Inlining prevents unused codegen in macros, so it's faster. Signed-off-by: usamoi <usamoi@outlook.com>
Marking pgrx_pg_sys bindings inline reduces compilation time. It took 150 seconds to build
pgrxbefore and it takes 36 seconds to buildpgrxnow.Before this PR:
After this PR:
Inlining prevents unused codegen in macros, so it's faster.