Performance Optimization Concern #3826
Unanswered
SatendraRaghav
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Team,
I would like to bring attention to a performance issue that I have encountered. When a page contains approximately 100 widgets, the renderComponentCanvas function is triggered 100 times, causing a significant delay in page load performance.
Issue Breakdown:
Impact:
This leads to unnecessary re-renders, increasing the time required to render the page.
The performance degradation becomes more noticeable as the number of widgets increases.
Note :
This issue does not occur when using the Button widget, as it does not rely on the AutoHeightContainer component.
AutoHeightContainer Component – useEffect Code:
updateComponentHeight Function:
const updateComponentHeight = useCallback((newHeight: number) => {
if (isDraggingInGlobal) return;
const rootState = store.getState();
const widgetLayoutInfos = getExecutionWidgetLayoutInfo(rootState);
const oldH = widgetLayoutInfos[displayName]?.layoutInfo.h ?? 0;
I would like to confirm whether my understanding of this issue is correct. If so, was this behavior intentionally implemented as part of the project's design? Additionally, is there a more efficient alternative to reduce unnecessary re-renders while preserving the required functionality?
I look forward to your insights on optimizing this behavior.
Beta Was this translation helpful? Give feedback.
All reactions