overleaf/services/filestore/app/js
Jakob Ackermann 0db4a17a14 [HealthCheckController] use fs.copyFile instead of fs-extra.copy
the fs-extra method has a HUGE overhead of JS code and also syscalls for
 no particular benefit in this case: just copy the tiny.pdf file.

Here is an overview of the major operations: paths are relative to
  https://github.com/jprichardson/node-fs-extra/blob/1.0.0

We start in /lib/copy/copy.js
- sys: check that the source file exists
- sys: check that the source file has an existing parent directory?!
Continue in /lib/copy/ncp.js
- sys: more stat calls on both source and dest to determine permissions
- read/write streams to pipe the file content through the process
- sys: chmod on the destination to match the source permissions

What we actually need is a call to the binding and let node/the os
 figure out the best way to copy the contents.

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2020-03-02 17:02:35 +01:00
..
Errors.js Simplify logging to log only once per http request 2020-01-10 15:41:36 +00:00
FileController.js Refactor request logger into a class 2020-01-14 12:02:39 +00:00
FileConverter.js Simplify logging to log only once per http request 2020-01-10 15:41:36 +00:00
FileHandler.js Simplify logging to log only once per http request 2020-01-10 15:41:36 +00:00
FSPersistor.js Revert "Merge pull request #91 from overleaf/revert-78-spd-migration-persistor" 2020-02-17 14:04:42 +00:00
HealthCheckController.js [HealthCheckController] use fs.copyFile instead of fs-extra.copy 2020-03-02 17:02:35 +01:00
ImageOptimiser.js Simplify logging to log only once per http request 2020-01-10 15:41:36 +00:00
KeyBuilder.js Move bucket-specific file endpoint into FileController 2020-01-07 15:05:51 +00:00
LocalFileWriter.js Simplify logging to log only once per http request 2020-01-10 15:41:36 +00:00
MigrationPersistor.js Revert "Merge pull request #91 from overleaf/revert-78-spd-migration-persistor" 2020-02-17 14:04:42 +00:00
PersistorHelper.js Revert "Merge pull request #91 from overleaf/revert-78-spd-migration-persistor" 2020-02-17 14:04:42 +00:00
PersistorManager.js Revert "Merge pull request #91 from overleaf/revert-78-spd-migration-persistor" 2020-02-17 14:04:42 +00:00
RequestLogger.js Move error handler to be the last middleware 2020-02-14 10:58:46 +00:00
S3Persistor.js Make S3 partSize a setting 2020-02-17 14:06:15 +00:00
SafeExec.js Simplify logging to log only once per http request 2020-01-10 15:41:36 +00:00