Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
perf: use fast-write-atomic instead of write-file-atomic
Browse files Browse the repository at this point in the history
fast-write-atomic is 10-20% faster depending on the operating system,
mainly because it does not use fs.realpath() and so many promises.
  • Loading branch information
mcollina committed Jan 4, 2019
1 parent e5d4646 commit da4de26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
"dependencies": {
"async": "^2.6.1",
"datastore-core": "~0.6.0",
"fast-write-atomic": "~0.2.0",
"glob": "^7.1.3",
"graceful-fs": "^4.1.11",
"interface-datastore": "~0.6.0",
"mkdirp": "~0.5.1",
"pull-stream": "^3.6.9",
"write-file-atomic": "^2.3.0"
"pull-stream": "^3.6.9"
},
"devDependencies": {
"aegir": "^15.3.1",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const setImmediate = require('async/setImmediate')
const waterfall = require('async/series')
const each = require('async/each')
const mkdirp = require('mkdirp')
const writeFile = require('write-file-atomic')
const writeFile = require('fast-write-atomic')
const path = require('path')

const asyncFilter = require('interface-datastore').utils.asyncFilter
Expand Down

0 comments on commit da4de26

Please sign in to comment.