It is the heaviest function executing on setup stage.
The culprit is the linear dependency between its execution
time and the amount of objects in registry. The solution is to store
object by status. While the optimization doesn't work for objects with
no status, it is currently provided by all scenarios.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
1. Get rid of JSON in the database.
2. Store `CreatedAt` as int64. It decreases JSON marshaling time by
about ~25% with no changes for native scheme.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>