Performance: split validation into multiple files, avoid using 'fixImages' and 'exractImages' into well-known themes as it takes a big chunk of data

This commit is contained in:
Pieter Vander Vennet 2024-08-11 12:03:24 +02:00
parent ac853ab021
commit 8c779fe09b
16 changed files with 1009 additions and 949 deletions

View file

@ -338,12 +338,7 @@ export default class LayoutConfig implements LayoutInformation {
...json,
layers: json.layers.filter((l) => l["id"] !== "favourite"),
}
const usedImages = new ExtractImages(this.official, undefined)
.convertStrict(
jsonNoFavourites,
ConversionContext.construct([json.id], ["ExtractImages"])
)
.flatMap((i) => i.path)
const usedImages =json._usedImages
usedImages.sort()
this.usedImages = Utils.Dedup(usedImages)