Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

Use async fs instead of fs.*Sync calls #147

Closed
alippai opened this issue Mar 21, 2018 · 4 comments · Fixed by #230
Closed

Use async fs instead of fs.*Sync calls #147

alippai opened this issue Mar 21, 2018 · 4 comments · Fixed by #230

Comments

@alippai
Copy link

alippai commented Mar 21, 2018

0x, a cool tool by @davidmarkclements shows, that (for my build) fs.realpathSync calls block the running for 15% of the total time.

image

@dima-takoy-zz
Copy link

Hello, I refactored this package with no sync methods. How I can bench refactored plugin?

@dima-takoy-zz
Copy link

Can be closed if PR will be merged.

@lukastaegert
Copy link
Member

lukastaegert commented May 6, 2019

A simple way of benchmarking is to run Rollup with the --perf option. Rollup's repo also has a script to automatically bundle a package several times and calculate averages. To do so, you would check out the main Rollup repo and run npm run perf:init <username>/<repo>#<branch>. This will clone the repo into a "perf" directory. The repo itself should contain a rollup config, but you can manually add one. Alternatively you can create that folder or the rollup config manually. Then run "npm run perf"

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 a pull request may close this issue.

3 participants