mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Style perf improvements (#2342)
* Add css-perf app. * Style properties now check only properties that are set. Image utils module required on top (instead of in onMeasure) to improve performance. Remove try/catch block when Style applies native property. * fix tslint * Fix broken merge Update package.json version * Failed miserably - if the try/catch around applyProperty method is removed - TextField fails big time. TextField needs some good refactoring as well as calls to _updateTextDecoration & _updateTextTransform utils - setTextTransform & setTextDecoration should be split, typing support should be added.
This commit is contained in:
12
apps/css-perf-test/app.ts
Normal file
12
apps/css-perf-test/app.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import application = require("application");
|
||||
|
||||
global.time = function(): number {
|
||||
if (global.android) {
|
||||
return java.lang.System.nanoTime() / 1000000; // 1 ms = 1000000 ns
|
||||
}
|
||||
else {
|
||||
return CACurrentMediaTime() * 1000;
|
||||
}
|
||||
}
|
||||
|
||||
application.start({ moduleName: "css-perf-test/root" });
|
||||
Reference in New Issue
Block a user