You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Oleksandr Karpovich 2ba7664f89 update readme 3 years ago
..
gradle/wrapper add examples for runtime measurements 3 years ago
karma.config.d add examples for runtime measurements 3 years ago
src add readme 3 years ago
webpack.config.d add examples for runtime measurements 3 years ago
.gitignore add examples for runtime measurements 3 years ago
README.MD update readme 3 years ago
build.gradle.kts add examples for runtime measurements 3 years ago
gradle.properties add examples for runtime measurements 3 years ago
gradlew add examples for runtime measurements 3 years ago
gradlew.bat add examples for runtime measurements 3 years ago
settings.gradle.kts add examples for runtime measurements 3 years ago

README.MD

This example project can be built and run for desktop, web and macos.

Available experiments:

var numberOfItems = 1000
// Experiment1.kt
addNComposableItems(numberOfItems)

// Experiment2.kt
removeAllItems(preAddedItemsCount = numberOfItems)

// Experiment3.kt
updateEveryXth(numberOfItems, xth = 2, repeatUpdate = 20)

The experiments can be run as tests in commonTest: ./gradlew jsTest jvmTest macosX64Test or macosArm64Test

It should print results into output.

MacOs:

For MacOs it makes sense to run it as an app in production mode: ./gradlew runReleaseExecutableMacosX64 or ./gradlew runReleaseExecutableArm64 In production, it shows much better results.

See macosMain/Main.kt to choose what experiment to run.

Browser (if running the app (jsMain/Main.kt) in a browser)

We have modified webpack.config.d to make the app run better in development mode:

config.devtool = undefined;  // default is `eval-source-map`
config.mode = 'none'; // default is `development`

This prevents kotlin source maps being added into the bundle. The default config options add a huge overhead and app's performance is much worse.