Add a flag we can use to skip string template calcs in release

This commit is contained in:
Panayot Cankov
2016-05-17 15:36:33 +03:00
parent 114f8b47ae
commit eda260323e
42 changed files with 705 additions and 238 deletions

View File

@@ -40,7 +40,9 @@ export class ControlsPage extends pagesModule.Page implements definition.Control
}
public onNavigatedTo() {
trace.write("Creating " + this._count + " controls...", trace.categories.Test, trace.messageType.info);
if (trace.enabled) {
trace.write("Creating " + this._count + " controls...", trace.categories.Test, trace.messageType.info);
}
this._infoLabel.text = "Creating " + this._count + " controls...";
var startTime = new Date().getMilliseconds();
for (var i = 0; i < this._childStackLayoutCount; i++) {
@@ -55,7 +57,9 @@ export class ControlsPage extends pagesModule.Page implements definition.Control
}
var elapsedTime = Math.round(new Date().getMilliseconds() - startTime);
var message = "Created " + this._count + " controls in " + elapsedTime + " ms.";
trace.write(message, trace.categories.Test, trace.messageType.info);
if (trace.enabled) {
trace.write(message, trace.categories.Test, trace.messageType.info);
}
this._infoLabel.text = message;
}
}