Is there an existing issue for this?
Current Behavior
I'm writing 6,700 files.
If I pass fsync: false to the options, it takes 9 seconds.
If I don't, it defaults to true, and it takes 152 seconds (!).
From the docs I see this:
If the fsync option is false, writeFile will skip the final fsync call.
Could you explain how important this final fsync call is? I'm considering to disable it.
Expected Behavior
I wish to have it faster, or understand whether it's safe to cancel the fsync.
Steps To Reproduce
try to write lots of files ( > 1000) to see the issue clearly.
Environment
- npm: 8.1.2
- Node: v16.13.2
- OS: Mac OS 12.6
- platform: Mac
Is there an existing issue for this?
Current Behavior
I'm writing 6,700 files.
If I pass
fsync: falseto the options, it takes 9 seconds.If I don't, it defaults to
true, and it takes 152 seconds (!).From the docs I see this:
Could you explain how important this final fsync call is? I'm considering to disable it.
Expected Behavior
I wish to have it faster, or understand whether it's safe to cancel the fsync.
Steps To Reproduce
try to write lots of files ( > 1000) to see the issue clearly.
Environment