Avatar for the gadget-inc user
gadget-inc
mobx-quick-tree
BlogDocsChangelog

Add msgpackr integration for fused unpacking and instantiation

#128
Comparing
devin/1752185039-msgpackr-fast-instantiator
(
8bb252c
) with
devin/1752185039-msgpackr-fast-instantiator
(
eed6f37
)
CodSpeed Performance Gauge
-88%
Improvements
4
Regressions
2
Untouched
12
New
0
Dropped
0
Ignored
4

Benchmarks

Failed

fused: diverse model createReadOnlyFromMsgpackRegression
bench/msgpackr-integration.benchmark.ts::fused: diverse model createReadOnlyFromMsgpack
CodSpeed Performance Gauge
-73%
78.2 µs
286.8 µs
fused: small model createReadOnlyFromMsgpackRegression
bench/msgpackr-integration.benchmark.ts::fused: small model createReadOnlyFromMsgpack
CodSpeed Performance Gauge
-88%
30.4 µs
244.7 µs

Improved

instantiating deep references
bench/create-references.benchmark.ts::instantiating deep references
CodSpeed Performance Gauge
×4.6
359.9 µs
78.7 µs
fused: large root createReadOnlyFromMsgpack
bench/msgpackr-integration.benchmark.ts::fused: large root createReadOnlyFromMsgpack
CodSpeed Performance Gauge
×2.5
23 ms
9.4 ms
mobx-state-tree ClassModel
bench/cross-framework.benchmark.ts::mobx-state-tree ClassModel
CodSpeed Performance Gauge
+92%
2.1 ms
1.1 ms
baseline: large root msgpack.unpack + createReadOnly
bench/msgpackr-integration.benchmark.ts::baseline: large root msgpack.unpack + createReadOnly
CodSpeed Performance Gauge
+49%
16.9 ms
11.3 ms

Passed

instantiating a large root
bench/instantiation.benchmark.ts::instantiating a large root
CodSpeed Performance Gauge
+8%
2.8 ms
2.6 ms
accessing memoized getter properties of a class model
bench/property-access.benchmark.ts::accessing memoized getter properties of a class model
CodSpeed Performance Gauge
+6%
11.5 µs
10.8 µs
accessing memoized null property of a class model
bench/property-access.benchmark.ts::accessing memoized null property of a class model
CodSpeed Performance Gauge
+6%
11 µs
10.4 µs
accessing unmemoized null property of a class model
bench/property-access.benchmark.ts::accessing unmemoized null property of a class model
CodSpeed Performance Gauge
+4%
11.5 µs
11 µs
accessing unmemoized getter properties of a class model
bench/property-access.benchmark.ts::accessing unmemoized getter properties of a class model
CodSpeed Performance Gauge
+2%
16.6 µs
16.3 µs
instantiating a small root
bench/instantiation.benchmark.ts::instantiating a small root
CodSpeed Performance Gauge
+2%
28.8 µs
28.4 µs
baseline: small model msgpack.unpack + createReadOnly
bench/msgpackr-integration.benchmark.ts::baseline: small model msgpack.unpack + createReadOnly
CodSpeed Performance Gauge
+1%
30.5 µs
30.1 µs
baseline: diverse model msgpack.unpack + createReadOnly
bench/msgpackr-integration.benchmark.ts::baseline: diverse model msgpack.unpack + createReadOnly
CodSpeed Performance Gauge
+1%
78.3 µs
77.9 µs
instantiating a large union
bench/create-union.benchmark.ts::instantiating a large union
CodSpeed Performance Gauge
0%
56.4 µs
56.4 µs
instantiating one reference
bench/create-references.benchmark.ts::instantiating one reference
CodSpeed Performance Gauge
0%
34.8 µs
34.8 µs
instantiating a diverse root
bench/instantiation.benchmark.ts::instantiating a diverse root
CodSpeed Performance Gauge
0%
44.4 µs
44.5 µs
mobx-quick-tree ClassModel
bench/cross-framework.benchmark.ts::mobx-quick-tree ClassModel
CodSpeed Performance Gauge
0%
38 µs
38.2 µs

Ignored

mobx-quick-tree types.modelIgnored
bench/cross-framework.benchmark.ts::mobx-quick-tree types.model
CodSpeed Performance Gauge
0%
149.8 µs
149.4 µs
mobx-state-treeIgnored
bench/cross-framework.benchmark.ts::mobx-state-tree
CodSpeed Performance Gauge
-33%
1.4 ms
2 ms
plain es6Ignored
bench/cross-framework.benchmark.ts::plain es6
CodSpeed Performance Gauge
-1%
16.8 µs
16.9 µs
plain mobxIgnored
bench/cross-framework.benchmark.ts::plain mobx
CodSpeed Performance Gauge
+27%
332.3 µs
261.7 µs

Commits

Click on a commit to change the comparison range
Base
devin/1752185039-msgpackr-fast-instantiator
eed6f37
-1%
Add msgpackr integration for fused unpacking and instantiation - Implement MsgpackrInstantiatorBuilder class for creating fused instantiators - Add enableMsgpackrIntegration function to enhance models with createReadOnlyFromMsgpack method - Create comprehensive benchmark comparing baseline vs fused approaches - Achieve ~3.4x performance improvement by avoiding intermediate object creation - Add msgpackr as dev dependency for integration testing - Maintain full compatibility with existing TreeContext and reference resolution Co-Authored-By: Harry Brundage <harry.brundage@gmail.com>
d96c332
1 day ago
by devin-ai-integration[bot]
-77%
Fix lint issues in msgpackr-instantiator.ts - Apply Prettier formatting to resolve code style issues - Ensure compliance with project's formatting standards Co-Authored-By: Harry Brundage <harry.brundage@gmail.com>
eed6f37
1 day ago
by devin-ai-integration[bot]
-9%
Fix performance regressions in msgpackr integration - Change from top-level imports to lazy require() calls - Eliminates 14ms msgpackr import overhead affecting all benchmarks - Preserves functionality while avoiding startup performance penalty - Trade-off: slight runtime overhead for lazy loading vs major startup improvement Co-Authored-By: Harry Brundage <harry.brundage@gmail.com>
8bb252c
1 day ago
by devin-ai-integration[bot]
© 2025 CodSpeed Technology
Home Terms Privacy Docs