re-enabled computation on client side for optimistic UI
This commit is contained in:
@@ -72,13 +72,11 @@ const calculationPropertyTypes = [
|
|||||||
* - Write the computed results back to the database
|
* - Write the computed results back to the database
|
||||||
*/
|
*/
|
||||||
export function recomputeCreatureById(creatureId){
|
export function recomputeCreatureById(creatureId){
|
||||||
// Skipping computation on the client can result in the server being made to
|
|
||||||
// do work that isn't possible, in exchange for dramatic performance gains
|
|
||||||
if (Meteor.isClient) return;
|
|
||||||
let props = getActiveProperties({
|
let props = getActiveProperties({
|
||||||
ancestorId: creatureId,
|
ancestorId: creatureId,
|
||||||
filter: {type: {$in: calculationPropertyTypes}},
|
filter: {type: {$in: calculationPropertyTypes}},
|
||||||
includeUntoggled: true,
|
includeUntoggled: true,
|
||||||
|
// TODO filter out expensive fields, particularly icon field
|
||||||
});
|
});
|
||||||
let computationMemo = new ComputationMemo(props);
|
let computationMemo = new ComputationMemo(props);
|
||||||
computeMemo(computationMemo);
|
computeMemo(computationMemo);
|
||||||
|
|||||||
Reference in New Issue
Block a user