Description
When doing a performance test, I found multiple flushes when creating a realm.
Those flushes are only needed when they are followed by a clear or when they are removing the entity. In all other cases they are wasting resources.
They prevent batching of writes to the database, and spend extra CPU cycles inspecting the persistence context.
Discussion
No response
Motivation
Faster creation of realms and clients.
Details
I'll create a PR