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
The breakdown is that tree isn't implemented on Windows :-)
Or, rather, the implementation is known to be broken, because Winforms doesn't support multiple columns of content in a Tree. Some of the recent discussions about a "Simple Tree" widget extend from this limitation.
Ok - so... the tree_source demo does do lazy loading (at least, as of #2017)... but that's only as good as the backend implementation.
Cocoa's implementation uses a view on the data source - it only renders what is visible, and asks for data on a cell-by-cell basis. Cells aren't expanded by default, and expandability is determined by the can_have_children attribute, which is determined based on whether the node is a file or a directory. The children aren't evaluated until you try to access the list of children, and this doesn't happen until a child is actually rendered.
GTK builds a full tree data model when it is loaded - which means creating all the children. #1978 has flagged that GTK has deprecated Gtk.TreeStore in favour of Gtk.ListModel, and from a casual inspection, it looks like that is more amenable to an "interface" based implementation; this might provide a way to fix the problem by making the GTK ListModel feeding the tree an API wrapper around the Toga TreeSource.
Describe the bug
The
tree_source
example creates a lazy-loading tree view of the current directory.dev
orrun
), thecwd
is$HOME
.....the app loaded 10GB in to memory before i killed itOSError
...for instance, a broken symlink in my home dirSteps to reproduce
Run
briefcase dev
for thetree_source
exampleExpected behavior
The directory used for the tree is enforced to be the directory of the app and it is actually lazy.
Screenshots
No response
Environment
0.3.15.dev361+g02f412be.d20230619
0.3.2.dev383+g7d68e74d.d20230619
Logs
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: