mgechev/ngast

Optimization proposal, getResolvedMetadata

irustm opened this issue · 0 comments

Hi!

Can it be better to read from a file on demand?

templateMetadata.template = this.resourceResolver.getSync(templateMetadata.templateUrl);

Only when it is necessary to execute getTemplateAst?

For example, in this place?

const dirMetadata = this.getResolvedMetadata();
if (dirMetadata) {
const source = dirMetadata.template;

I don't need to get all the styles, just the template.
And if a method of obtaining is called somewhere, then take from the cache.