realm / realm-js

Realm is a mobile database: an alternative to SQLite & key-value stores
https://realm.io
Apache License 2.0
5.8k stars 576 forks source link

Data Seeding Performance in realm-js 12 vs 11 is nearly 10x slow #6831

Open tharwi opened 3 months ago

tharwi commented 3 months ago

How frequently does the bug occur?

Always

Description

After upgrading from Realm JS 11 to Realm JS 12, I observed a significant increase in the time it takes to seed data. The seeding process time changed from approximately ~500 milliseconds to ~5000 milliseconds.

Stacktrace & log output

Data seeding completed in 5170 ms
Data seeding completed in 560 ms

Can you reproduce the bug?

Always

Reproduction Steps

  1. Clone the example project: realm-js-seed-example
  2. Install dependencies: npm install && cd ios pod install
  3. Run the project on a simulator/emulator or device
  4. Observe the time taken to seed data in the console.

Version

11.10.2 and 12.12.1

What services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

iOS 17.2

Build environment

react-native: 0.74.2 node: v18.17.1

Cocoapods version

1.15.2

sync-by-unito[bot] commented 3 months ago

➤ PM Bot commented:

Jira ticket: RJS-2880

kneth commented 3 months ago

@tharwi Thank you for reporting. We need to run a profiler on the app to see how the two different versions behave.

tharwi commented 3 months ago

Hi @kneth, thanks for looking into this. I’ll wait for any updates or findings from the profiling. Please let me know if you need any additional information from my-end.

tharwi commented 2 months ago

Hi @kneth and team, any update on this?

kospaa commented 1 week ago

Hello @kneth and team, any update on this?

kraenhansen commented 1 week ago

@kneth is no longer an active contributor to the project. With the notice of deprecation it is unlikely that this issue will be resolved any time soon (if at all).

kospaa commented 1 week ago

@kraenhansen thanks I missed this info !