Skip to content

Unnecessary backend lookups in Store.eObject(Id) #56

@gdaniel

Description

@gdaniel

All DirectWrite[xx]Store have an implementation of eObject(Id) that looks in the cache if the object has been loaded to avoid database calls. However, the cache lookup is initialized with new PersistentEObjectCacheLoader(eClass), that is called if the cache does not contain the requested element.
The eClass parameter of the loader forces the framework to find the EClass of the object in the backend before the cache lookup. This is not useful if the object is in the cache.

A more efficient implementation would be to initialize the PersistentEObjectCacheLoader with the id, and compute the corresponding EClass only if we need to load the object from the database (in the apply method).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions