realm / realm-js

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

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

Open tharwi opened 1 month ago

tharwi commented 1 month 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 1 month ago

➤ PM Bot commented:

Jira ticket: RJS-2880

kneth commented 1 month 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 1 month 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 3 weeks ago

Hi @kneth and team, any update on this?