- Use Expo for React Native
- Shadow-cljs
- npm libs are easier to use
- simple config
- e.g. for externs
{:infer-externs :auto}
- Use tachyons for design
- Chrome profiler
- Example app with tools
- Crucial point: app doesn't target desktop, only devices
- REPL most useful for debugging errors on node rather than as RDD workflow
- Things that affect startup time matter more in a containerized environment. You should try and move startup activities to build time:
- Loading Java classes in memory
- Class Data Sharing (core Java - distributed w/JDK)
- Application Class Data Sharing (your app)
- AOT Compilation with Graal
- use
native-image
that comes with Graal - fast startup, but:
- worse peak performance
- potentially worse GC
- use
- Efficient images
- small size
- use an Alpine Linux base image
openjdk11:alpine
- use layers to your advantage
- copy on write means identical layers are shared
- so can you, e.g. put dependencies into a layer?
- a useful tool on github:
orb/lein-metajar
- this means you can create a layer from the dep jars
- a useful tool on github:
- small size
- Respect the environment
- JVM self-tunes (ergonomics) based on
- available RAM
- depending on memory, it selects
- heap space
- compiler/GC cache sizes
- which GC to use
- depending on memory, it selects
- available CPUs
- selects:
- GC/compiler threadpool sizes
Runtime::getAvailableCPUs
- selects:
- available RAM
- JVM now respects container resource limits in 10, and > Java 8 u212
- Fun fact, there are 666 JVM args
-XX:+PrintFlagsFinal
on yr java cmd followed by| grep ergonomic
will show you how many JVM flags are set by ergonomics
- JVM self-tunes (ergonomics) based on
- Loading Java classes in memory