WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

ui5-datetime-picker: 30k nodes within dom #12823

@Roba1993

Description

@Roba1993

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

  1. Use the component
  2. 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

Labels

Type

No type

Projects

Status

New Issues

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions