mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
A web-based collaborative LaTeX editor
0db4a17a14
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> |
||
---|---|---|
services/filestore |