Moving elements in lists

Makes sense and thanks for the reply! We’ll give it a go in our proof of concept and see how it plays out.

What do you mean by this? Do you mean you should not use a top-level Y.Map?

This is not what I said. Read the answer again. Duane stored millions of GUIDs on the top level structure. Keys on maps can’t be garbage collected (they will be stored in memory even if they have been deleted - to resolve potential sync conflicts). In Duane’s case he was able to organize data in a YArray instead.

Sorry if I misunderstood. I’m just trying to understand what you meant by not using “a top-level data structure.” I was inferring from your previous comment:

I suggest not to use maps as the top-level data structure. Deleted properties will always take up space (the key-name can’t be removed). When you store the data in a Y.Array, you can delete data very efficiently.

The reason I’m asking is because I’m in the midst of designing my data model for an app I’m making and wanted to start off on the right foot.

Sure, no harm in asking. This has nothing to do with Y.Map being used as a top level data structure. This is an inherent problem of the Y.Map type.

Just in his case it was a top-level type. I suggested to use Y.Array instead :wink: