Completed
Last Updated: 17 Nov 2021 15:23 by ADMIN
Release 2.30.0
Michael
Created on: 05 Apr 2021 14:34
Category: UI for Blazor
Type: Bug Report
15
Possible TextArea performance issue related to validation components - DataAnnotationsValidator and ObjectGraphDataAnnotationsValidator

Hi,

In most of my projects I use the ObjectGraphDataAnnotationsValidator component for validating complex types; and I also use a lot of your components. I've noticed what I *think* might be a clash between this validator and some of your input components. I've built a simple (and crude) example but I think it demonstrates the problem.


In the example code we have a table with 2 cells - in both cells we have an EditForm and 10 TelerikTextArea components. The first cell's EditForm contains a ObjectGraphDataAnnotationsValidator instance and the 2nd cell doesn't. Hopefully when you try to reproduce you will notice a distinct difference in performance with the performance of the 2nd EditForm being great, while the 1st EditForm is quite laggy and gets worse the more items you add.


I'm wondering if there is a clash here between the ObjectGraphDataAnnotationsValidator and the input components or I'm using them incorrectly?


Thanks
Michael.

 

@page "/"

<table width="100%">
    <tr>
        <td width="50%">
            <h3>EditForm with ObjectGraphDataAnnotationsValidator</h3>
            <EditForm Model="Items">
                <ObjectGraphDataAnnotationsValidator />
                @foreach (var item in Items)
                {
                    <div style="display: flex">
                        <TelerikTextArea @bind-Value="item.TextValue" />

                        @if (Items.IndexOf(item) == (Items.Count - 1))
                        {
                            <TelerikButton OnClick="@(() => Items.Add(new DataItem()))">
                                Add
                            </TelerikButton>
                        }
                    </div>
                }
            </EditForm>
        </td>
        <td width="50%">
            <h3>EditForm without ObjectGraphDataAnnotationsValidator</h3>
            <EditForm Model="Items">
                @foreach (var item in Items)
                {
                    <div style="display: flex">
                        <TelerikTextArea @bind-Value="item.TextValue" />

                        @if (Items.IndexOf(item) == (Items.Count - 1))
                        {
                            <TelerikButton OnClick="@(() => Items.Add(new DataItem()))">
                                Add
                            </TelerikButton>
                        }
                    </div>
                }
            </EditForm>
        </td>
    </tr>
</table>

@code {
    protected List<DataItem> Items { get; set; }

    protected override void OnInitialized()
    {
        Items = new List<DataItem>();
        for (var i = 1; i <= 10; i++)
        {
            Items.Add(new DataItem { TextValue = $"This is item number {i}." });
        }
    }

    public class DataItem
    {
        public string TextValue { get; set; }
    }
}
4 comments
Bob
Posted on: 13 Aug 2021 12:37

Hello,

In my findings, this issue goes beyond TelerikTextAreas.  I've seen unbearable performance issues with TelerikTextBox, TelerikMaskedTextBox and also TelerikDatePicker.  At times it can take up to 30 seconds for a key press to be reflected on the page.  This is after implementing the work around to validate OnChange rather than the default of key press.

I have isolated the issue to validation.  If I remove DataAnnotationsValidator and ValidationSummary from my page, the Telerik controls behave as expected.

Also, If I use InputText and InputDate in combination with DataAnnotationsValidator and ValidationSummary, no performance issues.

Unfortunately this is a show stopper for us.

Michael
Posted on: 14 Apr 2021 07:54
Thanks Marin. I appreciate the quick response.
ADMIN
Marin Bratanov
Posted on: 14 Apr 2021 07:52

Hi Michael,

The ticketing system closes threads automatically after a week without activity. It is not a reflection of anything else but the system behavior. Should you need to, you can reopen tickets by posting in them.

As for the "Unplanned" status - this means that we believe there is a value in the enhancement or the bug is a valid problem. It means that we don't know when it will be implemented. When we know that the item status changes to things like "Planned" or "In Development" and a release number will appear when we know it.

So, what this means for the particular case - we believe there are performance improvements we can and should make for the TextArea component, but we don't know exactly when that will happen. 

The best way to know when it happens is to click the Follow button on the portal page, you will get emails for status updates.

Regards,
Marin Bratanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Michael
Posted on: 14 Apr 2021 07:11

Hi Telerik,

I just received a notification that the ticket which led to the creation of this bug has been closed. Given that the ticket has been closed and this issue has been tagged 'unplanned', I can only assume that Telerik doesn't believe there is an issue here; or the approach I've taken and how I'm using ObjectGraphDataAnnotationsValidator with your components is invalid. Either way, I'd appreciate some guidance / advice. If you believe it's a non issue I'd like to understand why and if I'm using the technology incorrectly, I'd also appreciate some feedback.

Thanks in advance,
Michael.