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: All property control renders when JS toggle button is clicked #18905
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except that one minor change requested.
Good job with the PR description :)
import { EVALUATION_PATH } from "utils/DynamicBindingUtils"; | ||
import { | ||
EVALUATION_PATH, | ||
isPathADynamicProperty, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT. I don't think we need articles here. isPathDynamicProperty
should be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SatishGandham
isPathADynamicTrigger and isPathADynamicProperty is being used in multiple places. Should I change it in this PR?
@aswathkk , any performance numbers? |
@SatishGandham I found the scripting time reduced from ~50ms to ~25ms after clicking on the JS toggle. |
/ok-to-test sha=ab2b231 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3701831117. |
/ok-to-test sha=ab2b231 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3705900418. |
/perf-test sha=ab2b231 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3708015282. |
/ok-to-test sha=824cdd1 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3727945159. |
/perf-test sha=ab2b231 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3728841549. |
/perf-test sha=ab2b231 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3729221059. |
Description
TL;DR: Fix the performance issue that happens when we click the JS toggle button in property pane.
Each property controls were getting rendered whenever we click the JS toggle button. This is since one of the selector used in PropertyControl was returning
dynamicPropertyPathList
which will always change when we click JS toggle button anywhere. Now, instead of returningdynamicPropertyPathList
from that selector, we are returning a derived boolean value that is specific for the PropertyControl which calls this selector.Similar behaviour was noticed with
dynamicTriggerPathList
as well. That is also resolved in a similar manner.While working on this, I noticed the ActionCreator was also rendering since we aren't using proper selectors. That is also fixed.
Introduced proxy-momoize library which is an alternative to reselect's createSelector. This makes use of ES6 proxies to do an efficient memoization.
Fixes #11040
Type of change
How Has This Been Tested?
Issues raised during DP testing
Checklist:
Dev activity
QA activity: