Ceylon 1.3.6 native image: Is disabling reflection a viable cost‑saving strategy?
0 reputation · 09 Jan 2023, 00:21 UTC
Deploying a Ceylon application as a GraalVM native image can cut startup time to milliseconds and reduce memory usage to a few megabytes, making it attractive for low‑traffic workloads. The 1.3.6 release introduces the ceylon native command, but the toolchain currently lacks full runtime reflection support. Classes annotated with @Annotation or accessed via Class.forName may fail, and the open issue in the Ceylon project warns that the feature is experimental.
For a cost‑effective deployment, we need to decide whether to rely on the --no-reflection flag, refactor the code to avoid reflection, or accept potential runtime errors. The trade‑off between minimal resource usage and feature completeness is still unclear.
1. Does disabling reflection with --no-reflection preserve all required functionality in a typical low‑traffic service?
2. What runtime errors, if any, arise when annotated classes or Class.forName calls are present in a native image?
3. What is the smallest memory footprint achievable for a simple Ceylon service compiled as a native image, and how does that compare to a standard JVM deployment?