Skip to content

Conversation

@rkaraivanov
Copy link
Member

  • Eliminated duplicate cache lookups: _getActionType() now returns both actionType and cachedView, avoiding redundant Map queries in _useCachedView()
  • Cached indexOf() results in _moveView(): Store indices instead of calling indexOf() twice for the same view references
  • Optimized _recreateView(): Reuse and update existing Map collections instead of creating new Map instances that overwrite existing entries
  • Direct detach in _useCachedView(): Use detach(0) directly since directive always inserts at index 0, avoiding unnecessary indexOf() call
  • Faster context operations: Use Object.assign() for context updates and spread operator for cloning instead of manual iteration
  • Improved _hasContextShapeChanged(): Use Set.difference() with size check fast-path for O(1) lookups instead of O(n) indexOf()

Checklist:

  • All relevant tags have been applied to this PR

- **Eliminated duplicate cache lookups**: _getActionType() now returns both actionType
  and cachedView, avoiding redundant Map queries in _useCachedView()
- **Cached indexOf() results in _moveView()**: Store indices instead of calling indexOf()
  twice for the same view references
- **Optimized _recreateView()**: Reuse and update existing Map collections instead of
  creating new Map instances that overwrite existing entries
- **Direct detach in _useCachedView()**: Use detach(0) directly since directive always
  inserts at index 0, avoiding unnecessary indexOf() call
- **Faster context operations**: Use Object.assign() for context updates and spread
  operator for cloning instead of manual iteration
- **Improved _hasContextShapeChanged()**: Use Set.difference() with size check fast-path
  for O(1) lookups instead of O(n) indexOf()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants