Poor performance on repeated calls to C1TrueDBGrid.Split.RecordSelectorWidth

Posted by: dev on 28 September 2022, 10:25 pm EST

    • Post Options:
    • Link

    Posted 28 September 2022, 10:25 pm EST

    Hi, we’ve noticed poor performance when Split.RecordSelectorWidth is repeatedly called.

    The property implementation doesn’t seem to check for the value having changed before issuing more work.

    We’ve worked around the issue by doing this check in our implementation, but it seems like C1 could fix this behaviour and it would improve usage of that property in all places.

    Thanks.

  • Posted 29 September 2022, 8:15 pm EST

    Hi,

    Thank you for sharing the issue. We could see the issue you mentioned and have reported the same to the development team. We will let you know as soon as we have an update.

    In the meantime, could you please share your use case/implementation, where you need to change the RecordSelectorWidth repeatedly?

    [Internal Tracking ID: C1WIN-28289]

    Best Regards,

    Kartik

  • Posted 30 September 2022, 7:35 am EST

    Hello Kartik, thanks for the inquiry.

    In our code, during a mass edit operation, we have validation rule checking on column change events, we use this property to adjust the header column width to display an error icon in it, and adjust it back if there are no errors.

    This may occur when edit concerns many records but is handled in an event handler which is repeatedly call, making it difficult to keep state or handle before / after optimisations.

    We have adjusted the code so it doesn’t call the setter if the width is already equal to the value it was about to be set.

    Generally, the component property setter should do this optimisation if the setter implementation has performance implication.

  • Posted 2 October 2022, 4:07 pm EST

    Hi,

    Thank you for sharing your implementation. We agree with your thoughts that the setter implementation should do this optimization check. We have shared your concerns with the development team and will let you know the updates soon.

    Best Regards,

    Kartik

  • Posted 2 January 2023, 9:18 pm EST

    Hi,

    We are glad to let you know that this behavior has been changed in the latest 2022v3 (584) release. You can update to the latest version using the ComponentOne Control Panel.

    (https://www.grapecity.com/componentone/download)

    Kind Regards,

    Kartik

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels