Skip to content

Performance degradation of the DatePicker #1170

Open
@bl96

Description

@bl96

Bug report

Required System information

  • Node.js version: 18.16.0
  • NPM version: 9.5.0
  • Strapi version: 4.11.3
  • Database: MariaDB
  • Operating system: Windows 11
  • Is your project Javascript or Typescript: Typescript

Describe the bug

The DatePicker is degrading drastically the performance of the page which uses them. I am rendering around 100 date pickers per page. This issue started from 4.11.0 - when using version 4.10.7 the DatePickers are rendered without high performance degradation. I tried to use only the basic DatePicker without additional logic and the performance was degraded the same.

Please let me know if more information is needed.

The basic DatePicker:
<DatePicker onChange={() => {}} selectedDate={new Date('1990-01-01')} label="Your birthday" onClear={() => {}} />;

Steps to reproduce the behavior

  1. Create a page with table
  2. For each row render a DatePicker, the base one can be used
  3. Check the performance with/without DatePicker

Screenshots

This is performance insight for the page with DatePickers (around 100 rendered), takes 16 seconds:

Screenshot 2023-06-29 220040

After I remove the DatePicker, the webpage is rendered in less then 4 seconds. Only the DatePicker is removed, nothing else:

Screenshot 2023-06-29 220351

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: bugIssue reporting a bugseverity: lowIf the issue only affects a very niche base of users and an easily implemented workaround can solvesource: design-systemrelates to design-system packagestatus: confirmedConfirmed by a Strapi Team member or multiple community members

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions