Thank you for your reply. I have tried setting blockSignals(True) on both the data model and the tree view before clearing rows (experimentally, with the understanding that it's not a great thing to do), and I see no difference. Also tried model.beginResetModel() and endResetModel() around the clear() method, and no difference there either.
I have also tried this amalgamation just to try to dig into the problem:
self.model_dailies.blockSignals(True)
self.tree_alldailies.blockSignals(True)
for row in range(self.model_dailies.rowCount()):
print("Removing", row)
self.model_dailies.removeRow(row)
self.tree_alldailies.blockSignals(False)
self.model_dailies.blockSignals(False)
From the print statement there, I can see that it starts out pretty quickly (removing approx 100 rows/second) then around 400-500 rows in, it slows down gradually to about 1 per second for the next ~500, and then fluctuates from there. This is true for any data that is being loaded/unloaded.
What really gets me is that I'm re-writing this program from a version I wrote with tkinter, and in the tkinter program, switching between the exact same data sets in the treeview is instantaneous even with the REST call.
I am admittedly very new to PySide2 and I'm sure I have much to learn (like implementing my own model from QAbstractItemModel), but I don't understand why merely adding text rows of data with Qt's own built-in QStandardItemModel yields such terrible performance!