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

Optimize HasProps.setv(attrs, {silent: true}) #10226

Merged
merged 1 commit into from Jun 24, 2020
Merged

Conversation

mattpap
Copy link
Contributor

@mattpap mattpap commented Jun 24, 2020

This is a quick and easy change to improve initialization speed, because when silent === true, we can skip all the setv() logic and get to updating values of properties directly.

@@ -333,7 +333,6 @@ export abstract class HasProps extends Signalable() implements Equals, Printable
private _setv(changes: Map<Property, unknown>, options: HasProps.SetOptions): void {
Copy link
Member

@bryevdv bryevdv Jun 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we renamed this to _setv_nonsilent or something just to make it clear?

Copy link
Contributor Author

@mattpap mattpap Jun 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to replace setv() and _setv() completely at some point (hopefully even in 2.2 cycle), so let's take a pause on renaming this.

@mattpap mattpap changed the base branch from master to branch-2.2 Jun 24, 2020
@mattpap mattpap merged commit d800201 into branch-2.2 Jun 24, 2020
@mattpap mattpap deleted the mattpap/setv_silent branch Jun 24, 2020
paul-tqh-nguyen pushed a commit to paul-tqh-nguyen/bokeh that referenced this pull request Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants