All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.4.31 (2024-10-26)
- use micro tasks in tasks handling code paths (8abd0c2)
- refine worker error handling expectation (dbc6f71)
0.4.30 (2024-10-24)
- ensure error on the worker side is propagated unchanged to main (22804e0)
- speed up isAsyncFunction() helper (8d451ae)
- silence tsc error (2b678f8)
0.4.29 (2024-10-14)
- pre-create worker if needed at the end of task execution (cd7406c)
- README.md: revert reformatting (5561f4e)
- deps: Bump github/combine-prs from 5.1.0 to 5.2.0 (3412820)
0.4.28 (2024-10-09)
- benchmarks: add upper/lower values to BMF throughput (d5ccee0)
- benchmarks: fix BMF report upper/lower values (c352783)
- fix benchmarks report conversion to BMF format (9d39cfe)
- benchmarks: cleanup JS runtime detection code (8bd7fa6)
- cleanup multiple JS runtime support implementation (ca64e63)
- cleanup task function ops validation (766352d)
- ci: add deno 2.x.x RC (a4c218d)
- ci: revert deno 2.x.x integration (d0bf8a9)
- ci: switch to deno v2.x.x (17e3705)
- deps: Bump sonarsource/sonarcloud-github-action (#68) (29df0a7)
0.4.27 (2024-09-08)
- track dynamic pool
empty
event lifecycle (1c82a75)
- add dynamic worker nodes count to pool info (27f1bca)
- refine dynamic pool shutdown test expectations (4562a61)
0.4.26 (2024-09-06)
- optimize backpressure task(s) stealing conditions (75ddbb8)
- add
isWorkerNodeStealing()
helper (508b201) - factor out stealing ratio conditions check into an helper (17369b6)
- cleanup error handling expectations (ecf101e)
0.4.25 (2024-08-30)
- handle properly small or zero
tasksStealingRatio
(ab6e570)
- move dynamic pool only getters to its own class (74970f2)
- cleanup code examples (28b119c)
- refine pool ready event emission condition (e7d0673)
- switch examples to top level await usage (ESM) (30781c3)
0.4.24 (2024-08-28)
- reduce useless branching at pool info building (1184246)
- track dynamic pool full lifecycle via events (5415178)
0.4.23 (2024-08-27)
- fix pool back pressure semantic on dynamic pool (00e2a3f)
- track pool busy and back pressure lifecycle via events (a58ab3b)
- format README.md (7c585a0)
0.4.22 (2024-08-26)
- ensure no deleted dynamic worker can be used to steal task(s) (5c504d4)
- cleanup worker node back pressure detection implementation (1e0e4b5)
- cleanup worker node state conditions check (5d8036c)
0.4.21 (2024-08-24)
- fix pool ready status with zero min size dynamic pool (cebb8d8)
- refine a code comment (1dc8bf2)
0.4.20 (2024-08-19)
- account for all stealing worker nodes (039ec77)
- define a variable only when needed (145c656)
- display back pressured worker nodes in pool info (51a3b96)
- format properly || condition (da6bafa)
0.4.19 (2024-08-14)
- reduce race condition at task response handling during pool destroy (7227fec)
0.4.18 (2024-08-14)
- ensure task stealing can't start twice on the same worker node (6d81a8e)
- fix dynamic worker node killing condition (6b3780e)
- trigger continuous tasks stealing under proper conditions (ed3da2d)
- silence leaks detection false positive on windows (96a0e78)
- refine code comment about task stealing conditions (2459840)
0.4.17 (2024-08-13)
- reenable tasks stealing under back pressure by default (a944273)
- protect worker node tasks queue from concurrent tasks stealing (dd85b2d)
- do mapExecute() args sanity checks once (633afa3)
- add documentation on enablePrority priority queue getter/setter (3ed4555)
- api: add missing tasksStealingRatio default value (4814bef)
0.4.16 (2024-07-18)
- add ratio of worker nodes in a pool allowed to perform concurrent tasks stealing (7b7defe)
- fix error type expectation (218cb7e)
- api.md: add missing ToC entry (96badd7)
- api.md: document tasksStealingRatio tasks queue option (9ed8a69)
0.4.15 (2024-07-11)
- priority-queue: cleanup intermediate variables namespace (a550353)
- cleanup bun runtime usage (f802707)
- fix PR template formatting (1d79921)
- flag WorkerChoiceStrategiesContext class as internal (ba6948a)
0.4.14 (2024-07-07)
- optimize tasks queuing implementation (4c4cdc0)
- factor out fixed queue common code in an abstract class (55070de)
- move queueing code into its own directory (f8f1e26)
0.4.13 (2024-07-05)
- release with release-please (bc35b50)
- ensure checks are run on release PR (71c26f3)
- ensure version is bumped on release in examples (a9b9dce)
- refine contribution documentation (c0c1ac7)
- refine PR template (369d51c)
- refine README.md (a25a2d1)
- refine README.md badges (4d91cd9)
- ci: cleanup GH action (a4b1ef1)
- ci: add autofix GH action (9fde7c1)
- ci: do not cancel workflow of autofix.ci fails (d1fe8c4)
- deps-dev: apply updates (2b2a96a)
- deps-dev: apply updates (7394780)
- deps: Bump oven-sh/setup-bun from 1 to 2 (d5c4430)
- Fix priority queue dequeue() from the last prioritized bucket.
- Add mapExecute() helper to execute a task function on an iterable data's input.
- Optimize tasks queue implementation.
- Enable prioritized tasks queueing only when necessary.
- Optimize circular buffer implementation to store task execution measurements.
- Switch to optimized circular buffer implementation to store task execution measurements.
- Bump version to deal with npm package publication issue.
- Ensure tasks stealing dynamic worker node is not destroyed on inactivity.
- Fix default task function worker choice strategy and priority handling.
- Avoid queued tasks redistribution on the errored worker node.
- Fix pools'
addTaskFunction()
type definition.
- Disable
tasksStealingOnBackPressure
by default until performance issues under heavy load are sorted out.
- Optimize task(s) stealing by dequeuing task(s) from the last prioritized bucket.
- Fix worker nodes priority queue k-buckets initialization.
- Support per task function(s) priority and worker choice strategy definition
via a task function object:
{ taskFunction: (data?: Data) => Response | Promise<Response>, priority?: number, strategy?: WorkerChoiceStrategy }
. - Add priority queue based tasks queueing. One priority queue is divided into prioritized buckets to avoid queued tasks starvation under load.
- BREAKING CHANGE:
listTaskFunctionNames()
tolistTaskFunctionsProperties()
in pool and worker API returning registered task functions properties. - BREAKING CHANGE:
strategy
field in pool information renamed todefaultStrategy
.
- Ensure dynamic worker node are initialized with sensible worker node usage default values to avoid worker choice strategies biased decisions.
- Ensure worker choice strategy options changes at runtime are propagated to poolifier workers.
- Do not reset worker node usage statistics at worker choice strategy runtime change.
- Fix bundling.
- Fix possible race condition at worker node recreation on worker node
error
andexit
events.
- Optimize different JavaScript runtime handling code with a branching less design pattern.
- Disable release publishing on https://deno.land/x/poolifier in favor of JSR: https://jsr.io/@poolifier/poolifier-web-worker.
- Add
errorEventHandler
handler support to pool options listening for error event on each worker.
- Ensure the minimum number of workers on a started pool is guaranteed.
- Add tatami-ng and Bun support to internal benchmark.
- Fix conditional imports promise resolution.
- Fix browser compatibility: ensure
node:...
imports are conditionals.
- Fix worker initialization with Bun.
- Fix publishing on JSR.
- Publish only the needed files on JSR.
- Refine package usage documentation.
- Publish on JSR.
- Fix browser web worker default type.
- Fix browser bundle format.
- Add TypeScript type declarations to npm package.
- Fix performance regression: compute estimated cpu speed only if strictly needed.
- Breaking change: remove node APIs usage in favor of Javascript web APIs. Pool
event emitter
emitter
property is renamed toeventTarget
and is using theEventTarget
web API.
- Fix examples in documentation.
- Fix npm package publication GitHub action.
- Add GitHub action to publish
poolifier-web-worker
package to npm packages registry.
- Fix npm package publication GitHub action, take 2.
- Add GitHub action to publish
poolifier-web-worker
package to npm packages registry.
- Fix npm package publication GitHub action.
- Add GitHub action to publish
poolifier-web-worker
package to npm packages registry.
- Add GitHub action to publish
poolifier-web-worker
package to npm packages registry.
- Fix null exception regression: #1496.
- Drop support for Deno version < 1.40.0: make
IWorker
interface compatible with Deno 1.40.x web worker type definition.
- Fix possible null exception at task finishing handling.
- Optimize Deque implementation to improve tasks queueing performance.
- Fix dynamic pool with minimum number of workers set to zero: #1748.
- Improve performance by clean up unneeded condition checks on hot code paths.
- Removed wrongly exposed pool public method.
- Properly handle dynamic pool with zero minimum size.
- Reduce branching in several hot code paths.
- Use faster object cloning implementation.
- Fix tasks redistribution triggers at pool destroying.
- Fix code coverage related deno tasks.
- Avoid worker node cross tasks stealing.
- Ensure only half the pool worker nodes can steal tasks.
- Readd ThreadPoolOptions TS type alias to PoolOptions.
- Avoid useless branching on pool type.
- Fix default worker weight computation.
- Ensure worker choice strategies implementation wait for worker node readiness.
- Fix pool destroying with tasks queuing enabled.
- Add queued tasks end timeout support to worker node termination.
- Make more robust the fix for possible null exception at handling task execution response.
- Fix possible null exception at handling task execution response.
- Wait for queued tasks to end at worker node termination.
- Cleanup default module exports.
- Ensure worker node is removed on worker error.
- TypeScript breaking change: merge ThreadPoolOptions type into PoolOptions type.
- Ensure worker choice strategy wait for worker nodes readiness.
- Add a fastpath when tasks stealing or redistribution is impossible.
- Remove all pool events listener at pool destroying.
- Fix task function usage statistics handling for sequentially stolen tasks.
- Make continuous tasks stealing start at worker node idling.
- Ensure pool statuses are checked at initialization,
start()
ordestroy()
. - Ensure pool
ready
event can be emitted after severalstart()/destroy()
cycles.
- Export via
mod.ts
instead ofindex.ts
.
- Improve documentation.
- Ensure pool cannot be initialized from a worker.
- Ensure worker initialization is done once.
- Add Bencher benchmark: https://bencher.dev/perf/poolifier-web-worker.
- Use builtin retry mechanism in worker choice strategies instead of custom one.
- Avoid null exception at sending message to worker.
- Avoid null exception at checking worker node readiness.