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

remove v8-compile-cache usage #8780

Merged
merged 2 commits into from
May 8, 2024
Merged

remove v8-compile-cache usage #8780

merged 2 commits into from
May 8, 2024

Conversation

davidfirst
Copy link
Member

v8-compile-cache doesn't play nice with ESM, that's why 2 years ago we created a component @teambit/toolbox.performance.v8-cache to uninstall it on demand when ESM is needed.
See #5071 for more info.

However, from some benchmarks I made recently, it turns out that it slows down the typescript-compilation on build (478 components, it takes 3:35 with the cache, 3:05 without the cache).
Another benchmark I made is simply loading bit with no args. Here is the average loading time on M1 Mac:

with toolbox.performance.v8-cache: 0.995s
no cache: 0.84s
v8-cache-directly: 0.75s

On Windows, without the cache and with toolbox.performance.v8-cache it took the same time.

In the near feature, all main envs will be using ESM so this v8 cache won't be relevant anyway. Also, once we are able to bundle bit to one file, this bundle won't include the v8-cache. Therefore, it makes more sense to just remove it instead of fighting it to make it somehow work for non-ESM.

@GiladShoham GiladShoham merged commit 06f3b7b into master May 8, 2024
11 checks passed
@GiladShoham GiladShoham deleted the remove-v8-cache branch May 8, 2024 11:23
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