Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Some improvements #1

Merged
merged 4 commits into from
Feb 28, 2021
Merged

Some improvements #1

merged 4 commits into from
Feb 28, 2021

Conversation

RobinMalfait
Copy link
Member

  • Using a shared seen cache allows us to go from 13,556 cache hits to 29,275 cache hits
  • Caching env variables, very small optimization but doesn't need to be re-calculated every run.
  • Using env.DEBUG to conditionally log diagnostics. This is also used to wrap our plugin with a before and after plugin so that we can start a timer and stop a timer regardless of what is happening in the "main" plugin.

This will allow us to skip processing lines if we already seen them in
another file. While testing this with our tailwindui.com codebase, I saw
the cache hits go from 13,556 to 29,275 hits.

This is an improvement for the initial build in a project with multiple
files. Subsequent rebuilds and projects with a single file won't benefit
from this improvement, but it also won't affect it in a negative way
which is nice.
@RobinMalfait RobinMalfait changed the title Some improvements [WIP] Some improvements Feb 28, 2021
@RobinMalfait RobinMalfait changed the title [WIP] Some improvements Some improvements Feb 28, 2021
@RobinMalfait RobinMalfait merged commit c5ce40c into master Feb 28, 2021
@RobinMalfait RobinMalfait deleted the robin branch February 28, 2021 13:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant