-
Type: Bug
-
Resolution: Fixed
-
Priority: Critical - P2
-
None
-
Affects Version/s: None
-
Component/s: None
-
SDK FY21-Q2
-
2845
recently updated from 3.6.4 to 5.0.3.
object creating takes much longer that it used to on both simulators and iphones + blocks ui.
Expected Results
quick creating as it used to be
Actual Results
average object creation takes about 400ms and blocks the ui
Code Sample
postRealm.write(() => { if (cleanAll) { let allPosts = postRealm.objects('post24').filtered('projectId = "' + projectId + '"'); let allLastUpdateTS = postRealm.objects('lastUpdateTS').filtered('projectId = "' + projectId + '" AND type = "post"'); postRealm.delete(allLastUpdateTS); postRealm.delete(allPosts); } preparedPostArray.forEach(post => { if (post && post.id) postRealm.create('post24', post, true); else { console.warn('post missing ID'); } }); if (projectId && ignoreTimestamp) postRealm.create('lastUpdateTS', { id: projectId + '_post', lastUpdateTS: newLastUpdateTS, projectId, type: 'post' }, true) });
Versions
- Realm JS SDK Version: 5.0.3
- React Native: 0.61.5
- Client OS & Version: macOs Catalina 10.15.4