Merge pull request #233 from overleaf/jpa-drop-sync-syscall

[perf] drop useless synchronous syscall on hot path for writing docs
This commit is contained in:
Jakob Ackermann 2021-05-18 11:44:00 +02:00 committed by GitHub
commit 74e45c60f4

View file

@ -334,12 +334,7 @@ module.exports = ResourceWriter = {
}
) // try and continue compiling even if http resource can not be downloaded at this time
} else {
const process = require('process')
fs.writeFile(path, resource.content, callback)
try {
let result
return (result = fs.lstatSync(path))
} catch (e) {}
}
})
})