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:
40
apps/App_Resources/Android/AndroidManifest.xml
Normal file
40
apps/App_Resources/Android/AndroidManifest.xml
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="__PACKAGE__"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<supports-screens
|
||||
android:smallScreens="true"
|
||||
android:normalScreens="true"
|
||||
android:largeScreens="true"
|
||||
android:xlargeScreens="true"/>
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="17"
|
||||
android:targetSdkVersion="__APILEVEL__"/>
|
||||
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
<application
|
||||
android:name="com.tns.NativeScriptApplication"
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/icon"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme" >
|
||||
<activity
|
||||
android:name="com.tns.NativeScriptActivity"
|
||||
android:label="@string/title_activity_kimera"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="com.tns.ErrorReportActivity"/>
|
||||
</application>
|
||||
</manifest>
|
||||
66
apps/App_Resources/iOS/Info.plist
Normal file
66
apps/App_Resources/iOS/Info.plist
Normal file
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>icon.png</string>
|
||||
<key>CFBundleIcons</key>
|
||||
<dict>
|
||||
<key>CFBundlePrimaryIcon</key>
|
||||
<dict>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>icon-40</string>
|
||||
<string>icon-60</string>
|
||||
<string>icon-72</string>
|
||||
<string>icon-76</string>
|
||||
<string>Icon-Small</string>
|
||||
<string>Icon-Small-50</string>
|
||||
</array>
|
||||
<key>UIPrerenderedIcon</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIRequiresFullScreen</key>
|
||||
<true/>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
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" });
|
||||
29
apps/css-perf-test/main-page.css
Normal file
29
apps/css-perf-test/main-page.css
Normal file
@@ -0,0 +1,29 @@
|
||||
.title {
|
||||
font-size: 20;
|
||||
margin: 3;
|
||||
}
|
||||
|
||||
.author {
|
||||
font-size: 14;
|
||||
horizontal-align: left;
|
||||
vertical-align: bottom;
|
||||
margin: 3;
|
||||
}
|
||||
|
||||
.comments {
|
||||
color: #10C2B0;
|
||||
font-size: 14;
|
||||
vertical-align: bottom;
|
||||
margin: 3;
|
||||
}
|
||||
|
||||
.thumbnail {
|
||||
width: 72;
|
||||
height: 72;
|
||||
margin: 3;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
TabView {
|
||||
background-color: white;
|
||||
}
|
||||
7
apps/css-perf-test/main-page.ts
Normal file
7
apps/css-perf-test/main-page.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import {EventData as ObservableEventData} from "data/observable";
|
||||
|
||||
export function navigatedTo(args: ObservableEventData) {
|
||||
setTimeout(() => {
|
||||
console.log(`Time: ${global.time() - global.startTime} ms`);
|
||||
});
|
||||
}
|
||||
307
apps/css-perf-test/main-page.xml
Normal file
307
apps/css-perf-test/main-page.xml
Normal file
@@ -0,0 +1,307 @@
|
||||
<Page
|
||||
xmlns="http://schemas.nativescript.org/tns.xsd" navigatedTo="navigatedTo">
|
||||
<ScrollView>
|
||||
<StackLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
<GridLayout columns="auto, *, auto" rows="auto, 25">
|
||||
<Image src="~/css-perf-test/res/logo" class="thumbnail" rowSpan="2"/>
|
||||
<Label text="Downloading..." textWrap="true" class="title" col="1" colSpan="2" minHeight="50" />
|
||||
<Label text="author " class="author" col="1" row="1" />
|
||||
<Label text="comments" class="comments" col="2" row="1" />
|
||||
</GridLayout>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
</Page>
|
||||
29
apps/css-perf-test/main-page2.css
Normal file
29
apps/css-perf-test/main-page2.css
Normal file
@@ -0,0 +1,29 @@
|
||||
.title {
|
||||
font-size: 20;
|
||||
margin: 3;
|
||||
}
|
||||
|
||||
.author {
|
||||
font-size: 14;
|
||||
horizontal-align: left;
|
||||
vertical-align: bottom;
|
||||
margin: 3;
|
||||
}
|
||||
|
||||
.comments {
|
||||
color: #10C2B0;
|
||||
font-size: 14;
|
||||
vertical-align: bottom;
|
||||
margin: 3;
|
||||
}
|
||||
|
||||
.thumbnail {
|
||||
width: 72;
|
||||
height: 72;
|
||||
margin: 3;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
TabView {
|
||||
background-color: white;
|
||||
}
|
||||
BIN
apps/css-perf-test/res/logo.png
Normal file
BIN
apps/css-perf-test/res/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
7
apps/css-perf-test/root.ts
Normal file
7
apps/css-perf-test/root.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import {Page} from "ui/page";
|
||||
|
||||
export function onTap(args: any) {
|
||||
global.startTime = global.time();
|
||||
let page = <Page>args.object.page;
|
||||
page.frame.navigate("css-perf-test/main-page");
|
||||
}
|
||||
3
apps/css-perf-test/root.xml
Normal file
3
apps/css-perf-test/root.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
<Button text="Start test" tap="onTap" />
|
||||
</Page>
|
||||
7
apps/package.json
Normal file
7
apps/package.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{ "name" : "Apps",
|
||||
"main" : "css-perf-test/app.js",
|
||||
"android": {
|
||||
"v8Flags":"--expose_gc",
|
||||
"profilerOutputDir": "/sdcard"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user