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

Improve data view example performance by limiting colors #1070

Merged
merged 1 commit into from
Jan 7, 2022

Conversation

corranwebster
Copy link
Contributor

@corranwebster corranwebster commented Jan 6, 2022

This is a trivial work-around to make the data view examples more performant.

The Color class instances are fairly heavyweight as they have lots of observers; they are intended for the use-case where there are a handful of colors that are shared and mutable. Before this change, the examples were creating lots of color objects. We now instead select randomly from a much smaller set. This dramatically improves start-up time.

@corranwebster corranwebster merged commit f02e9c6 into main Jan 7, 2022
@corranwebster corranwebster deleted the enh/improve-data-view-performance branch January 7, 2022 09:00
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

Successfully merging this pull request may close these issues.

2 participants