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

Micro optimizations for Viewable #6074

Merged
merged 5 commits into from
Dec 18, 2023
Merged

Conversation

philippjfr
Copy link
Member

Some small optimizations on Viewable that do add up when you create a lot of components:

  • Cache Design instances created internally (99% of the time the Design can and should be shared across all Viewable instances)
  • Do not run stop_loading if loading=False on instantiation (this is pointless to run on instantiation)
  • Small optimization avoiding .param.trigger() on ChatMessage

Copy link

codecov bot commented Dec 18, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (cd22c2a) 84.64% compared to head (0a082d9) 40.62%.
Report is 2 commits behind head on main.

❗ Current head 0a082d9 differs from pull request most recent head f12b633. Consider uploading reports for the commit f12b633 to get more accurate results

Files Patch % Lines
panel/chat/message.py 0.00% 3 Missing ⚠️
panel/viewable.py 80.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #6074       +/-   ##
===========================================
- Coverage   84.64%   40.62%   -44.03%     
===========================================
  Files         295      295               
  Lines       44003    43994        -9     
===========================================
- Hits        37248    17871    -19377     
- Misses       6755    26123    +19368     
Flag Coverage Δ
ui-tests 40.62% <61.53%> (+<0.01%) ⬆️
unitexamples-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@philippjfr philippjfr merged commit 6e09749 into main Dec 18, 2023
8 of 12 checks passed
@philippjfr philippjfr deleted the micro_optimizations_viewable branch December 18, 2023 14:53
philippjfr added a commit that referenced this pull request Dec 18, 2023
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.

None yet

1 participant