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
1 day ago
by devin-ai-integration[bot]
+55%
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
1 day ago
by devin-ai-integration[bot]
+361%
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
1 day ago
by devin-ai-integration[bot]
-410%
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
1 day ago
by devin-ai-integration[bot]
+5%
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>