Optimized some slow parts of the engine.

Last low hanging fruit: parsing is slow, cache parsed calculations
This commit is contained in:
Stefan Zermatten
2021-09-29 15:54:14 +02:00
parent cb10b53a10
commit cb1fd38df3
21 changed files with 151 additions and 96 deletions

View File

@@ -43,20 +43,24 @@ const ComputedOnlyContainerSchema = createPropertySchema({
contentsWeight:{
type: Number,
optional: true,
removeBeforeCompute: true,
},
// Weight of all the carried contents (some sub-containers might not be carried)
// zero if `contentsWeightless` is true
carriedWeight:{
type: Number,
optional: true,
removeBeforeCompute: true,
},
contentsValue:{
type: Number,
optional: true,
removeBeforeCompute: true,
},
carriedValue:{
type: Number,
optional: true,
removeBeforeCompute: true,
},
});