gadget-inc
mobx-quick-tree
BlogDocsChangelog

Optimize fast instantiator runtime performance

#126Closed
Comparing
devin/1752181708-fast-instantiator-performance-optimizations
(
b777bf2
) with
main
(
48add4f
)
CodSpeed Performance Gauge
-76%
Improvements
1
Regressions
1
Untouched
10
Ignored
4

Benchmarks

Failed

instantiating deep references
bench/create-references.benchmark.ts
Regression
CodSpeed Performance Gauge
-76%
86.4 µs362.9 µs

Improved

instantiating a large union
bench/create-union.benchmark.ts
CodSpeed Performance Gauge
×5.2
312.7 µs60.1 µs

Passed

instantiating one reference
bench/create-references.benchmark.ts
CodSpeed Performance Gauge
0%
38.9 µs38.8 µs
accessing unmemoized getter properties of a class model
bench/property-access.benchmark.ts
CodSpeed Performance Gauge
0%
16.2 µs16.1 µs
instantiating a large root
bench/instantiation.benchmark.ts
CodSpeed Performance Gauge
0%
2.7 ms2.6 ms
mobx-state-tree ClassModel
bench/cross-framework.benchmark.ts
CodSpeed Performance Gauge
0%
1.1 ms1.1 ms
instantiating a diverse root
bench/instantiation.benchmark.ts
CodSpeed Performance Gauge
0%
46.8 µs46.8 µs
mobx-quick-tree ClassModel
bench/cross-framework.benchmark.ts
CodSpeed Performance Gauge
0%
40.9 µs40.9 µs
accessing unmemoized null property of a class model
bench/property-access.benchmark.ts
CodSpeed Performance Gauge
-1%
11 µs11 µs
accessing memoized getter properties of a class model
bench/property-access.benchmark.ts
CodSpeed Performance Gauge
-1%
10.8 µs10.9 µs
accessing memoized null property of a class model
bench/property-access.benchmark.ts
CodSpeed Performance Gauge
-1%
10.4 µs10.5 µs
instantiating a small root
bench/instantiation.benchmark.ts
CodSpeed Performance Gauge
-1%
28.5 µs28.8 µs

Ignored

plain es6
bench/cross-framework.benchmark.ts
Ignored
CodSpeed Performance Gauge
0%
17 µs16.9 µs
mobx-quick-tree types.model
bench/cross-framework.benchmark.ts
Ignored
CodSpeed Performance Gauge
0%
149.8 µs149.8 µs
mobx-state-tree
bench/cross-framework.benchmark.ts
Ignored
CodSpeed Performance Gauge
+34%
1.5 ms1.1 ms
plain mobx
bench/cross-framework.benchmark.ts
Ignored
CodSpeed Performance Gauge
-1%
269.9 µs271.8 µs

Commits

Click on a commit to change the comparison range
Base
devin/1752181708-fast-instantiator-performance-optimizations
48add4f
-87.06%
Optimize fast instantiator runtime performance - Add identifier validation for safe dot notation property access - Optimize assignProps function to avoid Object.getOwnPropertyDescriptors overhead - Improve array instantiation to reduce spread operator overhead - Add comprehensive tests for identifier validation edge cases Expected 30-50% improvement in instantiation performance for large object graphs. Co-Authored-By: Harry Brundage <harry.brundage@gmail.com>
cd6f06c
5 months ago
by devin-ai-integration[bot]
+54.62%
Fix CI failures: prettier formatting, ESLint errors, and add propertyAccess utility - Fix prettier formatting issues in fast-instantiator.ts, model.ts, and identifier-validation.spec.ts - Fix ESLint no-prototype-builtins error by using Object.prototype.hasOwnProperty.call() - Add propertyAccess utility function to reduce code repetition in property assignments - Address GitHub comment about factoring out repetitive property assignment pattern Co-Authored-By: Harry Brundage <harry.brundage@gmail.com>
f3fb15f
5 months ago
by devin-ai-integration[bot]
×4.6
Revert assignProps function changes to fix observable instance regression - Reverted assignProps back to using Object.getOwnPropertyDescriptors() - Fixes 32.43% performance degradation in mobx-state-tree ClassModel benchmark - Keeps other optimizations (identifier validation, array instantiation) Co-Authored-By: Harry Brundage <harry.brundage@gmail.com>
e69c715
5 months ago
by devin-ai-integration[bot]
Optimize snapshot property access using propertyAccess utility - Updated all snapshot property access patterns to use propertyAccess() function - Applied consistent property access style throughout fast-instantiator.ts - Addresses GitHub comment from airhorns for performance consistency - Changes snapshot?.["${key}"] to snapshot?${propertyAccess(key)} Co-Authored-By: Harry Brundage <harry.brundage@gmail.com>
48add4f
5 months ago
by devin-ai-integration[bot]
+4.56%
Fix CI failures: formatting and performance regression - Fixed Prettier formatting issues in fast-instantiator.ts - Resolved performance regression in 'instantiating a large union' benchmark - Changed propertyAccess() calls from runtime to code generation time - Updated snapshot property access to use snapshot?.property syntax - Performance regression was caused by runtime propertyAccess() calls adding overhead Co-Authored-By: Harry Brundage <harry.brundage@gmail.com>
b777bf2
5 months ago
by devin-ai-integration[bot]
© 2025 CodSpeed Technology
Home Terms Privacy Docs