You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I very much appreciate the time and effort you put into this project!
I'm glad that I found your project because otherwise I'd have to write my own table-widget for pandas.DataFrame.
After #47 was fixed, I found out that the consumed memory still grows when table data is updated via updateModel.
While looking at the code, I realized that parts of the UI are newly generated on each call of Table.show (which is called by updateModel) without "destroying" all old widgets properly.
To fix this, some bigger changes are required - I think.
This quick fix unluckily produces an error in some cases:
--- a/pandastable/core.py+++ b/pandastable/core.py@@ -2868,11 +2868,9 @@ class Table(Canvas):
self.cols = self.model.getColumnCount()
self.tablewidth = (self.cellwidth)*self.cols
if hasattr(self, 'tablecolheader'):
- self.tablecolheader.destroy()- self.rowheader.destroy()
self.selectNone()
- self.show()- return+ else:+ self.show()
def new(self):
"""Clears all the data and makes a new table"""
Running my test program from below gives me following values for the current core.py:
Thanks, it's good to have someone who can read the code and make meaningful changes. self.show should only be called when the table is reloaded anew or when created so would this fix have a significant effect? either way I am happy to make the changes if you can address the errors your quick fix introduces. I guess the headers should be destroyed in the show method itself.
There is a performance issue in rendering tables when the window frame is larger (more rows/cols visible), hence the issue you referenced. It would be great to fix that too.
You 're right, it's only an issue when the widget is updated often. In my case the widget is used to show the data under the cursor of a matplotlib figure and is thus updated very often.
Dear Mr. Farrell,
I very much appreciate the time and effort you put into this project!
I'm glad that I found your project because otherwise I'd have to write my own table-widget for pandas.DataFrame.
After #47 was fixed, I found out that the consumed memory still grows when table data is updated via updateModel.
While looking at the code, I realized that parts of the UI are newly generated on each call of Table.show (which is called by updateModel) without "destroying" all old widgets properly.
To fix this, some bigger changes are required - I think.
This quick fix unluckily produces an error in some cases:
Running my test program from below gives me following values for the current core.py:
After applying the patch from above:
Obviously the patch has also an effect on the performance. #31
test program:
The text was updated successfully, but these errors were encountered: