I have a large grid (~9400 rows x 14 columns), filled using a wx.grid.GridTableBase
After the table has been filled I perform an AutoSizeColum
on all columns:
[self.grid.AutoSizeColumn(col) for col in range(self.grid.GetNumberCols())]
The issue is that specific operation takes 26 seconds (profiled with cProfile), which is unacceptable for my app'.
Are there alternative ways of doing this autosizing that would take much lower time (< 1 sec) ?
Solution based on AndersMunch proposal (see this link on wxpython.org)
AutoSizeColumns()
Costs less than 0.4 sec for my dataset, compared to the 26 sec initially.