Comments (4)
Bulk stuff as in... big buffer sizes passed to .read()? Just curious what this is about.
(Is it possible to tell a stream to use a bigger buffer size to reduce redundant code?)
from pacote.
@boutell it depends! fs.{read,write}File()
are significantly faster than fs.create{Read,Write}Stream()
. On the order of ~3x speedup for the former. And that's the case even when you bump things up such that it's a single _write
. There's benchmarks over at cacache that test reads and writes both in streaming and bulk mode, too, and cacache itself is already 3-4x faster when doing bulk operations on both read and write. (just clone the repo, do npm i && npm run benchmarks
)
The story with network requests is a little different. Probably because of all the stuff npm-registry-client
is doing for restarting and parsing bulk requests, streaming: true
is ~2x+ faster (more? I had a benchmark somewhere).
So pacote would need to make judicious use of both streams and bulk writes, depending on the data size (which fortunately we usually have, because of Content-Length
).
I already have a benchmark suite branch that I need to nudge a little more before it's ready to merge, but that's gonna be super important in finding the right combination for all this :)
from pacote.
Maybe I'll just push it up cause it might start being useful to folks who are interested in doing this sort of optimization golf 😁
from pacote.
#61 There we go. This should help.
from pacote.
Related Issues (20)
- Cannot require pacote
- Git semver does not resolve versions with prerelease or build info
- can no longer get manifest for custom tarball URL HOT 1
- git: support some form of integrity HOT 3
- jsonFromStream doesn't handle symlinks HOT 2
- connections opened but never closed HOT 9
- Crashes if run without cache option HOT 4
- Build failed ERR_STREAM_WRITE_AFTER_END: node v9.7.1 withExEditorHost v3.0.3 archlinux x86_64 HOT 24
- spurious ENOVERSIONS on git dependencies HOT 4
- A promise was created in a handler error HOT 24
- `_from` key of publishing package json should not have local file path of `tgz` file
- git: Does pacote respect per-project .npmrc file "git" parameter? HOT 1
- How to make pacote respect .npmrc? HOT 9
- Relation to npm / yarn / etc? HOT 2
- Unable to add local tarballs with sha1 integrity HOT 2
- Transitive dependency ([email protected]) license prevents use of pacote HOT 2
- "err.code.match is not a function" after a failed git clone HOT 10
- pacote should pass on opts.uid/opts.gid when invoking cacache.put
- pacote leaves user-owned files in /usr/lib/node_modules on Linux under sudo
- npm install failing on github repository
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pacote.