Jan 24 2020
So during the initial stage of Efl.Io.Model, it does start by listing all the files in a directory. This could then be batch notified to a composite Efl.SortedModel that would then sort them out and insert them relatively to each other and to the content of the SortedModel.
Which usage do you see adding multiple elements in multiple places? I can't think of anything off the top of my head.
Basically that would be a batch insert at one position. This is doable, but I doubt it would be very useful.
I think that this model can have two strategy for the sorting. On the first notification of a child being added or if the count > 0 when the compositing is done, the model batch fetch all the child of the composited model and sort them using a merge sort. The idea would be to keep just an index mapping of which child of the sorted model map to which child in the composited model.
Can't we have a index + Iterator insert operation that inserts a range at position defined by index?
I am also not saying this is mandatory, but would be good to take this into account.
It really depends :-) For the moment, we do not have much example of Model. Efl.Io shows that in the same code, their is place for batch insertion and solo insertion. Not sure how our code base is going to look once we have some network Model and so on.
I mean the user code, not the insert operation.
Not necessarily, it depends on the internal of the code that is doing the insertion. Very often we do have Model temporary in memory that would be near where we insert. This is especially true if we are doing sorted insertion, as this require to compare models all the way to the point where we want to insert them.
To have a Model you must traversal the whole list
Ideally we would want the ability to insert multiple items, but that seems only possible if Model are provided and not index (As index change every time an object is inserted).
This will be necessary to provide an Efl.SortedModel.
So Efl.BooleanModel does actually provide the ability to efficiently store this information and I consider this done.
This is actually done with an efl_provider_find done during the finalize of Efl.Ui.WidgetFactory.
I think the state of this is good enough and could be improved forever. So let settle with what we have and if anyone get time to improve in the future, we can reopen this task.
Jan 8 2020
This was resolved by 115a9a22b1d25d8d3b2d433994cc6756174b11b9