Skip to content

CheckBox state propagation slow for large number of nodes #820

@GoranDespalatovic

Description

@GoranDespalatovic

Steps to reproduce :

  1. Create grid with 5 nodes each having 250000 child nodes, set all node's checkType to triStateCheckBox.
  2. Check root node, grid will select all nodes just fine
  3. Expand any of those 5 nodes, deselect checkBox. Grid takes much more time to set check states.

Suggestion :

change following methods

procedure TBaseVirtualTree.WMKeyUp(var Message: TWMKeyUp);
procedure TBaseVirtualTree.HandleMouseUp(var Message: TWMMouse; const HitInfo: THitInfo);

replace

DoCheckClick(FCheckNode, FPendingCheckState);

with

            BeginUpdate;
            try
              DoCheckClick(FCheckNode, FPendingCheckState);
            finally
              EndUpdate;
            end;

I'm not shure if it will break something because of issue #805 but it's worth considering. After code change grid selects checkboxes allmost immediately even on million child nodes.

Metadata

Metadata

Assignees

Labels

EnhancementOpen for DiscussionThere are several possibilites to address the issue and anyone is invited for comments.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions