Skip to content

Realm init takes a significant amount of time #8204

Open
@dlbuckley

Description

@dlbuckley

How frequently does the bug occur?

Always

Description

Overview

We are currently investigating app launch times and have realised that Realm is taking up a significant portion (80-90%) of the time it takes to launch our app. As it stands we initialise Realm in our app delegate as we need to access data from it very early in our app lifecycle.

I started a discussion topic here but didn't receive any feedback thus far.

From my experimentation it appears that there is a lot happening in Realm init and as our app grows so does the time it takes to run init and in turn, our launch times. It's so long now that I'm wondering if there is an issue with initialisation within Realm, hence raising a bug report.

To give an idea of how bad this can get; in the real world we are seeing times around the 4 seconds mark in some cases which isn't great for the user experience. See the discussion thread for more information.

Stacktrace & log output

No response

Can you reproduce the bug?

Always

Reproduction Steps

See the discussion thread: #8194

Version

10.37.2

What Atlas Services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

iOS 16.2

Build environment

Xcode version: 14.2
Dependency manager and version: SPM

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions