As suggested by a contributor in another issue #343 (about backlinking), I'm opening this due to a really slow performance when trying to store a reference to the parent in every children of a 3-level deep JSON tree data, apart from embedding each level of children to the parent.
For the sake of the issue, I prepared an example set of 3 levels of data (Continent,Country,City), with my corresponding Realm.js file where I set up the schemas, and the main React component where I perform the import. Please note that due to some refactoring to be able to post this here in a simple manner, some import statements might be misleading, but the important part is the fact that, once this example is up and running, it can take more than 10 minutes to insert, having each Level of the tree 6(Continent), 34(Country) and 466(City) items.
As suggested by a contributor in another issue #343 (about backlinking), I'm opening this due to a really slow performance when trying to store a reference to the parent in every children of a 3-level deep JSON tree data, apart from embedding each level of children to the parent.
For the sake of the issue, I prepared an example set of 3 levels of data (Continent,Country,City), with my corresponding Realm.js file where I set up the schemas, and the main React component where I perform the import. Please note that due to some refactoring to be able to post this here in a simple manner, some import statements might be misleading, but the important part is the fact that, once this example is up and running, it can take more than 10 minutes to insert, having each Level of the tree 6(Continent), 34(Country) and 466(City) items.
Realm.js - where I set up schemas
MainComponent.js - where I perform the insert
I know the nested for loops are not pretty, but for the sake of testing they prove my issue.
JSON data for the example:
data.json.zip
DISCLAIMER: I might be doing something wrong, so forgive me if I took a bad approach.