Enqueue Work
A Node.js child process worker library for my London Node Meetup talk.
This is a proof of concept! Do not use this library in production.
Example Usage
'use strict'; const createQueue = ; const WORKER_SCRIPT = 'sorter.js'; // see test/sorter/index.jsconst WORKER_COUNT = 4; const queue = ;const result = await queue;
Benchmarks
Array.prototype.sort
Uses a merge sort in V8 when n > 10, which has an average complexity of O(n log n).
React Server-Side Rendering (SSR)
Please note that React 16 provides Node.js stream rendering, which will substantially reduce the time to first byte (TTFB) of your markup!
Running locally
git clone https://github.com/jamesseanwright/enqueue-work.git
cd enqueue-work
nvm install
/nvm use
npm i
npm run benchmark