python - pyqtgraph.ParameterTree is very slow -


i using payqtgraph.parametertree software project. basic functionality pretty similar recommended use of widget , looks this:

t = parametertree() params = [] params.append([         {'name': 'test1', 'type': 'str', 'value': somevalue, 'readonly':     true},         {'name': 'test2', 'type': 'str', 'value': someothervalue,     'readonly': true},]  self.p = parameter.create(name='params', type='group', children=params) self.t.setparameters(self.p, showtop=false) 

now, problem self.t.setparameters(self.p, showtop=false) extreeemely slow. fill params dynamically, because tree content depends on user file selection. 30 tree elements pretty fast, above 150 obnoxiously slow, if may that.

i tried kinds of things first thought about, deactivating parametertree signal emission before constructing it, , reactivating after construction self.t.blocksignals(true) or so, didn't change anything.

i found out tree performs item.treewidgetchanged() event each time parameter element added , line bottleneck. however, that's part of pyqtgraph api , i'm not supposed modify that. :/

do have idea if there's way speed things up?

thanks!


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -

What is happening when Matlab is starting a "parallel pool"? -