You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{Task}from"../../models/task";import{BehaviorSubject}from"rxjs/Rx";exportclassTaskStore{tasks=newBehaviorSubject([]);//tasks = new BehaviorSubject<Task[]>([]); // -> change above line withis this one solves slow compilation//_tasks = new BehaviorSubject([]); // -> change above line withis this one solves slow compilation}
import {bootstrap} from 'angular2/platform/browser';
import {TaskStore} from "./app/services/task-store/task-store";
import {TaskService} from './app/services/task-service/task-service';
class TestClass {
}
bootstrap(TestClass, [
TaskService,
TaskStore,
]);
leads to super slow compilation. Commenting in any of the lines above makes the compilation about 6 times faster.
See this repositiory as a reference for the problem:
As a quick overview of the problem, caching is broken for class this types and RxJs is a commonly used project that relies on caching common base types to be able to compile fast enough.
I would keep this open, fix for this types does not make this issue completely go away - compilation time is dropped from 8-9 to ~6 seconds but still it is kind of slow. Crux of the problem - rxjs-5.0.0.beta2 exposes a number of types that look similar and quite complicated in structure and doing a full structural comparison of them takes a lot of time
vladima
added
External
Relates to another program, environment, or user action which we cannot control.
Fixed
A PR has been merged for this issue
and removed
External
Relates to another program, environment, or user action which we cannot control.
labels
Jun 8, 2016
TypeScript Version:
1.8.7
Code
Having three classes like this:
leads to super slow compilation. Commenting in any of the lines above makes the compilation about 6 times faster.
See this repositiory as a reference for the problem:
https://github.com/choeller/slow-ts-compiler-demo/
The text was updated successfully, but these errors were encountered: