Skip to content

Performance issue #1956

@RicardoBelmont

Description

@RicardoBelmont

Describe the bug
Performance issue with LiveCharts2 redraw events triggered excessively when container size changes in a modal window.

To Reproduce
Steps to reproduce the behavior:

  1. Open a modal window that contains a LiveCharts2 chart.
  2. Within the modal, include dynamic content such as a textbox whose content can change (affecting layout).
  3. Change the content of the textbox or initiate closing of the modal.
  4. Observe that the chart's redraw event is triggered multiple times rapidly.

Expected behavior

The chart should only trigger a redraw event when strictly necessary. In scenarios such as closing a modal or changing unrelated content, redraws should be minimized to avoid performance issues.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Windows 11/Server

Smartphone (please complete the following information):
Not tested

Additional context
The issue seems to stem from the chart detecting container size changes too sensitively, leading to multiple redraw calls in a short span of time. This is especially noticeable when closing the modal, where it causes a visible delay and poor user experience. A debouncing mechanism or optimization in the redraw logic might help mitigate this.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions