-
-
Notifications
You must be signed in to change notification settings - Fork 531
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
Speed up Pane.clone with 50% #5848
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #5848 +/- ##
==========================================
+ Coverage 84.02% 84.03% +0.01%
==========================================
Files 290 291 +1
Lines 42420 42479 +59
==========================================
+ Hits 35643 35698 +55
- Misses 6777 6781 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Wow super excited for all the speed gains you're discovering! |
I've done this a few times now so most low hanging fruit are likely gone but after param 2.0 some performance characteristics have likely changed. We should really add a basic asv based performance profiling suite, even if it only covers a small number of test cases initially. |
109eacf
to
f6e03c8
Compare
Pane.clone did the same look up three times which was costly.
This changes to one lookup and also makes the code more readable.
Measurement 1
Running pytest on below code shows ~3% speed up consistently.
The reason why I found this is that I can see in apps
.clone
loops overself.param.values().items()
. And loops overself.param.values().items()
takes up +5% of the time of loading apps in my tests. My hypothesis is that that one could be improved significantly.