Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate pgx-pg-sys bindings based on features #455

Merged
merged 5 commits into from
Mar 1, 2022

Conversation

Hoverbear
Copy link
Contributor

This resolves #452 .

Please note these performance measurements are done on a 32 core machine which was not previously CPU bound, and still is not CPU bound, so the gains between "generating all bindings" and "generating one binding" is quite small. On a machine with less cores (or doing other things) these gains would be more noticeable.

Here's with generating all bindings:

image

While doing just one feature:

image

Notice the dramatic reduction in CPU!

As discussed in #452, this adjusts the update-versions.sh script to make it regenerate the bindings (and build all packages to make sure they aren't broken)

@Hoverbear
Copy link
Contributor Author

Here's comparing the CPU load for a ZomboDB build between #441 and this PR (which builds atop it since it's merged to develop)

Before:

image

After:

image

@Hoverbear Hoverbear self-assigned this Feb 25, 2022
@eeeebbbbrrrr
Copy link
Contributor

LGTM. However, please retarget this PR to the develop branch.

@Hoverbear Hoverbear changed the base branch from master to develop March 1, 2022 15:53
@Hoverbear
Copy link
Contributor Author

This also improves errors when a feature isn't specified:
image

Signed-off-by: Ana Hobden <[email protected]>
@Hoverbear Hoverbear merged commit 182bea4 into develop Mar 1, 2022
@Hoverbear Hoverbear deleted the pgx-pg-sys-feature-specific branch March 1, 2022 17:18
@Hoverbear Hoverbear mentioned this pull request Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pgx-pg-sys should only generate version-specific bindings
2 participants