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 have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
This issue only relates to a single bug. I will open new issues for any other problems.
Describe the bug
When a table is created with headers, the function that is called to update the header is called once for each header entry whenever any cell within the table's body is refreshed using table.RefreshItem(tablecellid).
With a limited number of tables that aren't changing often this is not noticeable, but as the number of cells changing increases especially with multiple tables it causes major issues.
The cpu usage increases, but not to 100% but there may be some sort of deadlocking going on, but this is purely as guess based on what ive seen. I had a progress bar that showed the latency of a websocket connection. As the number of tables increased, eventually the websocket disconnected. Without the custom headers, this wasn't an issue until significantly more tables had been added to the display.
How to reproduce
Create a table with headers.
Add a function for createheaders and updateheader.
In the updateheader function log the id.col and id.row.
Add a go routine to change cells within the table body's data, it doesnt matter if the cells are visible or not.
You will notice the updateheader function will log an entry for each header cell whenever a body cell changes.
It may be linked to the following code in func (r *tableCellsRenderer) refreshForID(toDraw TableCellID) in the widget/table.go file (around line 1342: for id, head := range headers { r.cells.t.updateHeader(id, head) }
This appears to be calling the updateHeader function for each header cell whenever the table renderer refreshes any part of the table.
Checklist
Describe the bug
When a table is created with headers, the function that is called to update the header is called once for each header entry whenever any cell within the table's body is refreshed using table.RefreshItem(tablecellid).
With a limited number of tables that aren't changing often this is not noticeable, but as the number of cells changing increases especially with multiple tables it causes major issues.
The cpu usage increases, but not to 100% but there may be some sort of deadlocking going on, but this is purely as guess based on what ive seen. I had a progress bar that showed the latency of a websocket connection. As the number of tables increased, eventually the websocket disconnected. Without the custom headers, this wasn't an issue until significantly more tables had been added to the display.
How to reproduce
Create a table with headers.
Add a function for createheaders and updateheader.
In the updateheader function log the id.col and id.row.
Add a go routine to change cells within the table body's data, it doesnt matter if the cells are visible or not.
You will notice the updateheader function will log an entry for each header cell whenever a body cell changes.
Screenshots
No response
Example code
Fyne version
2.4.5
Go compiler version
1.19.2
Operating system and version
windows 10 /amd64
Additional Information
No response
The text was updated successfully, but these errors were encountered: