-
Notifications
You must be signed in to change notification settings - Fork 349
Enhance stylex.props to precompile more often
#1242
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
base: main
Are you sure you want to change the base?
Conversation
workflow: benchmarks/perfComparison of performance test results, measured in operations per second. Larger is better.
|
workflow: benchmarks/sizeComparison of minified (terser) and compressed (brotli) size results, measured in bytes. Smaller is better.
|
|
@nmn looks like there's still a few failures. will get you a repro soon |
2c942f8 to
e84cf6a
Compare
stylex.props to precompile more often
|
will attempt a resync soon |
What changed / motivation ?
stylex.propsshould be able to precompile to a static string or a simple expression that chooses from pre-compiled strings and skip runtime merging of classNames when all styles are defined and available statically in the same file.Today, this is limited to direct usages only.
This PR expands that to be able to pre-compile simple expressions and constants as well, but still, intentionally bail in the case of all imports.
This should improve overall performance when StyleX styles are being used entirely locally without any cross-file style composition.