Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swap out fs-extra.copy for tar-fs #151

Closed
max-mapper opened this issue Oct 7, 2015 · 7 comments
Closed

swap out fs-extra.copy for tar-fs #151

max-mapper opened this issue Oct 7, 2015 · 7 comments
Labels
help wanted Needs a contributor from the community

Comments

@max-mapper
Copy link
Contributor

to fix #150

we should switch to using https://www.npmjs.com/package/tar-fs: tarfs.pack().pipe(tarfs.extract()), its like JSON.parse(JSON.stringify(obj)) but for filesystems :) it's a simpler solution than using ncp, which is not currently maintained

patch welcome!

@max-mapper max-mapper added the help wanted Needs a contributor from the community label Oct 7, 2015
@sindresorhus
Copy link
Contributor

There's also cpy.

@max-mapper
Copy link
Contributor Author

I wrote this for something else just now, its 12 lines: https://github.com/maxogden/cptar

ide referenced this issue in ide/electron-packager Mar 30, 2016
ncp sometimes has issues (see #150 and #151) -- use cptar instead
develar referenced this issue in develar/electron-packager Apr 10, 2016
Closes #213, #150, #151
develar referenced this issue in develar/electron-packager Apr 10, 2016
Closes #213, #150, #151
develar referenced this issue in develar/electron-packager Apr 11, 2016
Closes #213, #150, #151
develar referenced this issue in develar/electron-packager Apr 11, 2016
Closes #213, #150, #151
@malept malept changed the title swap out ncp for tar-fs swap out fs-extra.copy for tar-fs Aug 21, 2016
@natew
Copy link

natew commented Nov 29, 2017

Wondering if this would fix an issue I'm having...

When I run packager I get errors across a few apps. Chrome quits itself most fo the time and won't re-open without crashing until after packager runs. And then VSCode complains of too many open file references.

Guessing this is due to large amounts of node_modules. Currently am able to build most of the app into webpack bundles which may be the way to go.

Just realized this is a couple years old...

@malept
Copy link
Member

malept commented Nov 29, 2017

@natew Probably not. tar-fs is the transfer mechanism, it doesn't change the way the JavaScript is stored on disk.

@malept
Copy link
Member

malept commented Nov 29, 2017

I've been testing this enhancement off and on over the past week. The amount of code that has to change isn't bad, however there is a consistent performance decrease that I've noticed. It adds about a minute to the testsuite when I run it locally.

@malept
Copy link
Member

malept commented Nov 29, 2017

For reference: any replacement of fs-extra.copy has to have, at minimum, support for optionally dereferencing symlinks and a user-configurable filter.

@malept
Copy link
Member

malept commented Jan 2, 2019

I'm closing this due to the performance drop I saw.

@malept malept closed this as completed Jan 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Needs a contributor from the community
Projects
None yet
Development

No branches or pull requests

4 participants