Skip to content

Improve performance of invalidation of refs in bokehjs #13334

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

Merged
merged 3 commits into from
Aug 19, 2023

Conversation

mattpap
Copy link
Contributor

@mattpap mattpap commented Aug 15, 2023

This makes bokehjs' properties system aware of refs, making the invalidation of refs less expensive or allowing to skip it altogether. The duality of this design is required both to efficiently handle fully typed properties and those dynamically typed (using Any or AnyRef and combinations).

@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Merging #13334 (23b39bb) into branch-3.3 (88109a2) will decrease coverage by 0.01%.
Report is 2 commits behind head on branch-3.3.
The diff coverage is n/a.

@@              Coverage Diff               @@
##           branch-3.3   #13334      +/-   ##
==============================================
- Coverage       92.45%   92.44%   -0.01%     
==============================================
  Files             315      315              
  Lines           20152    20156       +4     
==============================================
+ Hits            18631    18634       +3     
- Misses           1521     1522       +1     

@@ -463,6 +545,10 @@ export namespace Kinds {
override toString(): string {
return `NonNegative(${this.base_type.toString()})`
}

may_have_refs(): boolean {
return this.base_type.may_have_refs()
Copy link
Member

Choose a reason for hiding this comment

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

What is an example of a case where this is true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Most likely it will never be true, but for the sake of completeness it's there. In the future I need to add some more structure to those classes, so this will be implemented the same for for all single parameterized kinds. I suppose it could be an optimization to just return false.

@mattpap mattpap merged commit 962a34c into branch-3.3 Aug 19, 2023
@mattpap mattpap deleted the mattpap/kinds_may_have_refs branch August 19, 2023 08:04
Chiemezuo pushed a commit to Chiemezuo/bokeh that referenced this pull request Aug 27, 2024
* Improve performance of invalidation of refs in bokehjs

* Further optimize HasProps._value_record_references()

* Increase test timeout for MacOS in CI
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants