You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The EntityManagers public API is (subjectively) pretty straight-forward and easy to consume. This is something that I want to preserve. However, there are plenty of room of making the interal operations of it adjustable through some configurations.
Idea
varentityManager=EntityManager(options)
options
An Object (or undefined) of options which drives certain behaviours of the EntityManager.
The initial capacity (number of entities) of the entity manager.
options.autoAdjust
Wether the capacity (number of entities) should grow / shrink as entities are added / removed. When set to true, the list of entities would;
double in size if all enteties are used
shrink to 3/4 size if half of all entities are un-used
options.lazy
Wether all entities should be eagerly pre-instantiated (false) or lazily instatiated as an entity is created (true). This is a tradeof of speed vs memory
The text was updated successfully, but these errors were encountered:
The
EntityManager
s public API is (subjectively) pretty straight-forward and easy to consume. This is something that I want to preserve. However, there are plenty of room of making the interal operations of it adjustable through some configurations.Idea
options
An
Object
(orundefined
) of options which drives certain behaviours of theEntityManager
.options.capacity
The initial capacity (number of entities) of the entity manager.
options.autoAdjust
Wether the capacity (number of entities) should grow / shrink as entities are added / removed. When set to
true
, the list of entities would;options.lazy
Wether all entities should be eagerly pre-instantiated (
false
) or lazily instatiated as an entity is created (true
). This is a tradeof of speed vs memoryThe text was updated successfully, but these errors were encountered: