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

Introduce "visitor" feature flag #367

Merged

Conversation

chinedufn
Copy link
Contributor

@chinedufn chinedufn commented Dec 17, 2022

This commit adds a "visitor" feature flag to the lightningcss crate.

This feature flag controls whether or not the Visitor trait gets
compiled. The "visitor" flag is disabled by default.

Disabling the "visitor" feature disables the lightningcss-derive
dependency.

This commit on its own reduces the lightningcss crate's build time by
about 8% (as measured by comparing cargo clean && cargo build --timings with and
without the "visitor" feature enabled.

When combined with some of the other soon to land commits, this commit
will make it possible to remove syn from the dependency tree when you
don't need it, which should lead to substantial compile time savings.

Related: #357

@chinedufn chinedufn force-pushed the visitor-derive-feature-flag branch 2 times, most recently from 8d73eee to 870c006 Compare December 18, 2022 18:14
This commit adds a "visitor" feature flag to the lightningcss crate.

This feature flag controls whether or not the `Visitor` trait gets
compiled. The "visitor" flag is disabled by default.

Disabling the "visitor" feature disables the `lightningcss-derive`
dependency.

This commit on its own reduces the lightningcss crate's build time by
about 8% (as measured by comparing `cargo build --timings` with and
without the "visitor" feature enabled.

When combined with some of the other soon to land commits, this commit
will make it possible to remove `syn` from the dependency tree when you
don't need it, which should lead to substantial compile time savings.

Related: parcel-bundler#357
@devongovett devongovett merged commit 560b784 into parcel-bundler:master Dec 21, 2022
@chinedufn chinedufn deleted the visitor-derive-feature-flag branch December 21, 2022 19:28
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.

None yet

2 participants