Assuming this.source is set on widget creation, delite/Store will fire the query against the store in Store#computeProperties(), before the subclass's computeProperties() method runs. Thus, if the subclass sets this.query in its computeProperties() method, it will trigger another store query. This is inefficient, especially if the query runs against the server.
Instead, delite/Store should delay running the query until after the subclass's computeProperties() method has run. Presumably by using after advice.
This problem could also be solved by using dcl.superCall() in all of the subclasses, but modifying delite/Store.js seems cleaner.
Assuming
this.source
is set on widget creation, delite/Store will fire the query against the store inStore#computeProperties()
, before the subclass'scomputeProperties()
method runs. Thus, if the subclass setsthis.query
in itscomputeProperties()
method, it will trigger another store query. This is inefficient, especially if the query runs against the server.Instead, delite/Store should delay running the query until after the subclass's
computeProperties()
method has run. Presumably by using after advice.This problem could also be solved by using
dcl.superCall()
in all of the subclasses, but modifying delite/Store.js seems cleaner.