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

Python: Parse glean.h header at build time #852

Merged
merged 2 commits into from
May 4, 2020

Conversation

mdboom
Copy link
Contributor

@mdboom mdboom commented Apr 29, 2020

This uses the instructions in the CFFI docs to parse the glean.h header at build time, rather than run time.

This improves the time of import glean from 301ms to 0.3ms. Seems like a big win, particularly for commandline apps that may run multiple times as part of a build, etc.

@auto-assign auto-assign bot requested a review from travis79 April 29, 2020 17:59
Copy link
Member

@travis79 travis79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is cool! Nice speed boost!

@mdboom mdboom force-pushed the python-cffi-parse-at-build-time branch 2 times, most recently from ae34b1e to 41ba457 Compare April 29, 2020 20:19
@mdboom mdboom force-pushed the python-cffi-parse-at-build-time branch from 41ba457 to 126ffb6 Compare May 4, 2020 19:17
@mdboom mdboom force-pushed the python-cffi-parse-at-build-time branch from 0499834 to becebad Compare May 4, 2020 19:23
@mdboom mdboom merged commit 9abef72 into mozilla:master May 4, 2020
@mdboom mdboom deleted the python-cffi-parse-at-build-time branch May 4, 2020 19:34
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.

2 participants