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
component extends=quick {
function relation() { hasOne(...) }
function applyGlobalScopes() {
this.withFoo().withBar().withBaz();
}
function scopeWithFoo(qb) { addSubselect("foo", "relation.nestedRelation.property1"); }
function scopeWithBar(qb) { addSubselect("bar", "relation.nestedRelation.property2"); }
function scopeWithBaz(qb) { addSubselect("baz" "relation.nestedRelation.property3"); }
}
"nestedRelation" is an entity with 100 properties, which can take about 10ms to run "retrieveQualifiedColumns".
For every instantiation of the HasOne relation, it re-runs "retrieveQualifiedColumns", which scales poorly.
Can the results of retrieveQualifiedColumns be cached? I would expect yes if it only considers non-virtual, lexically declared properties (i.e. those declared like property name='foo' sqltype='varchar' ...;); I have some traces that seem to indicate this is the case, but my visibility into the inner workings is limited and maybe it does, or sometimes can, consider virtual attributes, which may make caching difficult.
If it only considers lexically declared properties, it might be nice to do this at coldbox startup time, maybe configurably. In production cases I wouldn't expect schema to change. In development, well, you'd have to reboot coldbox, which seems reasonable.
The text was updated successfully, but these errors were encountered:
we have something like this
"nestedRelation" is an entity with 100 properties, which can take about 10ms to run "retrieveQualifiedColumns".
For every instantiation of the
HasOne
relation, it re-runs "retrieveQualifiedColumns", which scales poorly.Can the results of
retrieveQualifiedColumns
be cached? I would expect yes if it only considers non-virtual, lexically declared properties (i.e. those declared likeproperty name='foo' sqltype='varchar' ...;
); I have some traces that seem to indicate this is the case, but my visibility into the inner workings is limited and maybe it does, or sometimes can, consider virtual attributes, which may make caching difficult.If it only considers lexically declared properties, it might be nice to do this at coldbox startup time, maybe configurably. In production cases I wouldn't expect schema to change. In development, well, you'd have to reboot coldbox, which seems reasonable.
The text was updated successfully, but these errors were encountered: