Skip to content

Improve performance of invalidation of refs in bokehjs#13334

Merged
mattpap merged 3 commits into
branch-3.3from
mattpap/kinds_may_have_refs
Aug 19, 2023
Merged

Improve performance of invalidation of refs in bokehjs#13334
mattpap merged 3 commits into
branch-3.3from
mattpap/kinds_may_have_refs

Conversation

@mattpap

@mattpap mattpap commented Aug 15, 2023

Copy link
Copy Markdown
Contributor

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

codecov Bot commented Aug 15, 2023

Copy link
Copy Markdown

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     

}

may_have_refs(): boolean {
return this.base_type.may_have_refs()

Copy link
Copy Markdown
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
Copy Markdown
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
@github-actions

Copy link
Copy Markdown

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