-
Notifications
You must be signed in to change notification settings - Fork 279
Description
Bug Description
I'm using the ui5-datetime-picker and ui5-datet-picker component a few times on some pages. We recognized that on these pages the performance is dropping significantly. After looking into the problem I detected, that a single picker component is creating around 30k dom nodes. This has a big impact on the performance on lighter devices from our customers.
I'm using the following script to check the amount of nodes.
(() => {
const root = document.querySelector('body');
let count = 0;
const walk = (node) => {
count++;
if (node.shadowRoot) {
node.shadowRoot.querySelectorAll('*').forEach(walk);
}
node.children && [...node.children].forEach(walk);
};
root && walk(root);
return count;
})()My request would be to not render the picker popup when it's not needed. This would reduce the amount of nodes just to the one needed for the input. When a user wants to change the daytime/time the nodes can be added and shown.
Affected Component
ui5-datetime-picker | ui5-datet-picker
Expected Behaviour
The nodes of the picker should only be added to the dom, when they are needed.
Isolated Example
No response
Steps to Reproduce
- Use the component
- Count the nodes with the script above
Log Output, Stack Trace or Screenshots
No response
Priority
High
UI5 Web Components Version
2.8
Browser
Chrome
Operating System
Mac
Additional Context
No response
Organization
Exolynk AG
Declaration
- I’m not disclosing any internal or sensitive information.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status