Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Unnecessary Re-rendering #61

Merged
merged 3 commits into from
Nov 19, 2022

Conversation

li-xin-yi
Copy link
Collaborator

@li-xin-yi li-xin-yi commented Nov 18, 2022

Change

  1. Use lazy eval function instead of accessing pods directly. So the components using pod/pods will not re-render when any value changes in pods.
  2. Memorize MyMonaco component with only id and gitvalue property. Prevent force rendering from parent components.
  3. Clean up auto layout function for codeNode.

The following work later if available:

  1. ResultBlock will be re-rendered when its parent codeNode was dragged. I think we can also memo it and set the execution number like out[num] in (Pod UI improvements #55) as a prop to force re-rendering it only when the result changes. I just remained it as origin, please consider combining this issue when implementing the execution number.

close #51

Copy link
Collaborator

@lihebi lihebi left a comment

Choose a reason for hiding this comment

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

Thanks!

@lihebi lihebi merged commit 39b4500 into codepod-io:main Nov 19, 2022
@lihebi lihebi mentioned this pull request Nov 20, 2022
@li-xin-yi li-xin-yi deleted the fix/unnecessary_re-render branch December 13, 2022 22:19
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.

Improve Performance
2 participants