Closed almarklein closed 3 years ago
Ha very interesting! The future doc should suggest to turn off debug
to increase performance.
It was mostly the props check that made things slow, so running with debug=True
, but adding dev_tools_props_check=False
is fine!
I also changed tests/performance2.py
a bit to get slider.value
-> index.data
-> trace.data
-> figure. This is more similar to what we have in the slicer. I found out that creating the trace separately and storing it in a store caused the big performance difference that I was still seeing.
Last time I totally overlooked the effect of debug mode on the performance. The benchmarks perform much better now :)
I also saw that with debug mode there seems to be quite some added overhead per callback, even if that callback just passes a value from an input to an output.
The debug feature most responsible for the performance penalty here seems to be
dev_tools_props_check
, so you can also disable that, and still benefit from other debug features 🚀Running
tests/performance1.py
now gives me: