Max size of a realm file


I have a realm file with about 26k object. In CSV this is about 9 MB data, after converting it to a realm it’s blown up to 97 MB (!).

My qustions are:

  • Is the increase in file size normal? Can one do something about it?
  • When importing that file, the phone crashes. Is there any information about how big a realm file should maximally be? (I wouldnt use an 90MB file, but it would be interesting t know where the boundaries are)


@386sx The reason is regarding the transaction and operations log of the realm - this should be pruned on the client side however - you can also enable compact() on the client - you can take a look here:

There is no maximum of a Realm file it all just depends on the maximum the client system can handle. Is it crashing from out of memory or disk space? If it is memory I would recommend loading the realm with few transactions.


Ok, cool, thanks.
I did not check where exactly the crash happens, but I think I’ll be able to work with synced realms, without prepopulating them.

But I will look into compaction.