-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
Decouple opening and closing of file descriptors from src and dest #158
Comments
@phated I've been looking into this a bit, thought I'd share:
I'm now thinking probably the last of these would be best to look at first, if that turns up a negative then I'd say we're done here. I'll not have a lot of time but would like to set up a simple experiment around this when I have the chance. Thoughts? |
BTW, in working up courage to attack this issue, I did some cosmetic stuff, for instance to make |
Forgot to mention: one little annoyance here is that in Node 0.10 we can't pre-open an FD if we want to use it to make readable/writable streams. That was only introduced in 0.12. For some reason I have the impression that bumping minimum require node version is not really an option, have I got that right? If so, that'd mean an extra little complication for this issue. |
I'm really liking your work and interested in much of the refactor (commented on the commits). Would you want to send it over in some PRs? Does it make sense to be a single refactor PR or multiple smaller ones? I definitely want to keep supporting node 0.10 through the gulp 4 release. We can consider dropping it in future releases but so many people still use it today. |
Thanks for the quick reply! Actually my feeling was the extra metadata operations in I am aware of the guideline against plugins interacting with the fs directly, but my impression is lots of commonly used plugins do this, if only because they're just wrappers around other libs, like uglify or sass. Also, there's no vfs api to unlink files, right? So while there still might be an argument for having a single utility for opening and closing fd's, and then use that also from Glad you like some of those commits, I'll address your comments later today and make a PR. A single PR would be most convenient I think, not sure if I should squash the commits (maybe easier for others to rebase if I don't?). |
We do merge + squash now so they'd all turn into a single commit. I agree that the lazy closing will probably cause more problems than it solves. |
All right, so would that mean you'd prefer multiple PRs? Or won't people mind (I'm thinking authors of currently open PRs) a single commit which bunches together some more or less unrelated changes? |
Probably send them as multiple PRs. I think that is better for documenting the changes. |
Sure thing, I'll split the commits over several branches and make PRs for each of those. |
@phated I've made five PRs, there's a single commit in my aesthetix branch ("Consistent callback names") which I figured is probably better to submit after some or all of these are merged, because conflicts. |
Closing this because we determined that lazy closing descriptors is a bad idea. |
This could be done in a separate utility that might close descriptors lazily (having it ready in case a subsequent pipeline wants it).
Ref #151 (comment)
The text was updated successfully, but these errors were encountered: