Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TreeControl extreme slow with many children (+workaround) #75

Open
erwincoumans opened this issue Aug 4, 2013 · 0 comments
Open

TreeControl extreme slow with many children (+workaround) #75

erwincoumans opened this issue Aug 4, 2013 · 0 comments

Comments

@erwincoumans
Copy link

When adding 10k or 100k items in the list, the performance of TreeControl grinds to a halt. Reproduction: simply add a while loop in the UnitTest.cpp

char msg[1024];
for (int i=0; i < 10000;i++)
{
sprintf(msg,"Node %d",i);
Gwen::UnicodeString txt =Gwen::Utility::StringToUnicode(msg);
ctrl->AddNode( msg);//L"Node One" );
}

It seems the TreeControl::OnChildBoundsChanged is called many times, and causes the slowdown.

When uncommenting the "m_ScrollControl->UpdateScrollBars();" , it becomes fast, and you can have 10.000 or even 100.000 items in the TreeControl. Obviously, you have to make sure the 'UpdateScrollBars()' is still called, whenever changes happen.

Perhaps GWEN could use lazy evaluation for the UpdateScrollBars?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant