Skip to content

ignore visited components for all_app_wrap_components#5404

Merged
adhami3310 merged 1 commit intomainfrom
ignore-visited-components-for-all_app_wrap_components
Jun 2, 2025
Merged

ignore visited components for all_app_wrap_components#5404
adhami3310 merged 1 commit intomainfrom
ignore-visited-components-for-all_app_wrap_components

Conversation

@adhami3310
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Implements optimization in component traversal by preventing infinite recursion and duplicate processing in _get_all_app_wrap_components method across Bare and Component classes.

  • Added ignore_ids parameter in /reflex/components/base/bare.py to track processed component IDs
  • Modified /reflex/components/component.py to check component IDs against ignore set before recursion
  • Improved performance for complex component hierarchies by eliminating redundant processing
  • Enhanced stack overflow protection through systematic tracking of visited components

💡 (5/5) You can turn off certain types of comments like style here!

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Jun 2, 2025

CodSpeed Performance Report

Merging #5404 will not alter performance

Comparing ignore-visited-components-for-all_app_wrap_components (7597a2f) with main (13bedad)

Summary

✅ 8 untouched benchmarks

@adhami3310 adhami3310 merged commit ecf3be8 into main Jun 2, 2025
42 checks passed
@adhami3310 adhami3310 deleted the ignore-visited-components-for-all_app_wrap_components branch June 2, 2025 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants