CampbellGroup / common

Shared campbell lab code.
GNU Lesser General Public License v3.0
8 stars 5 forks source link

Script scanner slow when changing parameters #245

Open fanmingyu212 opened 6 years ago

fanmingyu212 commented 6 years ago

The script scanner gui sometimes freezes for 1-10 s when changing parameters through the parameter vault using set_parameter function. Restarting the script scanner gui sometimes solves the issue, but sometimes not.

The line of code that takes the most time to execute is https://github.com/CampbellGroup/common/blob/master/lib/clients/script_scanner_gui/tree_view/Models.py#L198. Changing line 179 above max_index= self.createIndex(index.row(), node.columns, index.internalPointer()) to max_index= self.createIndex(index.row(), node.columns-1, index.internalPointer()) seems to solve the issue.