Skip to content

Terminate the compilation early for style elements #808

@vicb

Description

@vicb

Currently when the ResolveCss step encounter a style element, it set currentElement.ignoreBindings to true to "disable" further steps.

What about terminating the compile process earlier in such a case - it would speed up compilation.

I see two ways to do this:

  • returning a value from step.process(),
  • add a terminate() method in CompileControl:
export class CompileControl {
  _exit: boolean;

  internalProcess(results, startStepIndex, parent:CompileElement, current:CompileElement) {
    this._exit = false;
    for (var i=startStepIndex; i<this._steps.length && !this._exit; i++) {
      //...
    }
  }

  terminate() {
    this._exit = true;
  }
}

@tbosch, what do you think ?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions