I’ve created a custom select widget and I’m using the setv
method for updating model’s properties.
Recently I found out that when there’s a large amount of options in the dropdown, the widget gets stuck after selecting a few options (right at the point where the value
property should get updated).
After going through Bokeh’s built-in widget definitions I noticed that usually a regular assignment is used instead of using setv
. What’s the difference between the two? Is setv
known for a tendency to be less performant in some cases?
setv
is a lower-level implementation detail. There is never any reason to use it unless you need to pass one of the specialized options e.g. {silent: true}
to it, but this is rare/unusual, even in the BokehJS codebase itself.
Property assignment is equivalent to calling setv()
, see: