Repository navigation
Releases: beint-no/thim
Release list
0.13.0
- Registry dispatch stays JIT-compilable. The generated
TemplateSet.renderkept the index switch and the subclass fallback chain in one method. Above about 215 templates that method exceeded HotSpot's 8000-byte huge-method limit and was never compiled. ReAI web-app (353 templates) paid about 190 ns per render instead of about 10 ns. Dispatch now uses a small dispatcher, 256-template chunk methods and a separate fallback. Rendered output is unchanged. (#64) - Removed
HtmlOutput.url(TrustedUrl). Nothing called it, and calling it skipped context-path resolution. (#64) - The compiler builds its naming regexes once, and stale docs were fixed. (#64)
- KSP 2.3.12, Spring Framework 7.0.9, Spring Boot 4.1.1, JUnit 6.1.3. (#65)
0.12.2
Small compiler improvements with unchanged generated output and runtime behavior:
- Generate Java at its final indentation, eliminating whole-renderer copying and regex formatting.
- Reuse route matches within one compilation while checking HTTP methods, enum coverage and diagnostics for every use.
On ReAI/M5 Max, median complete rebuilds after different-length static template edits improved from 6.68 s to 6.15 s; same-length resource-only edits improved from 5.60 s to 5.53 s. Results vary by edit and machine. No separate development compiler or additional generated resources.
Validated with the full clean build, isolated-project checks, golden renders, route-cache regressions and byte-for-byte consumer generated-output comparisons. See PR #63 and PERFORMANCE_AUDIT.md for measurements and limits.
Thim 0.12.1
What's Changed
- Cache repeated property discovery during template compilation by @gregjotau in #61
- Release 0.12.1 by @gregjotau in #62
Full Changelog: v0.12.0...v0.12.1
Thim 0.12.0
What's Changed
- Group generated renderers into hash-assigned source files for incremental compilation by @gregjotau in #59
- Release 0.12.0 by @gregjotau in #60
Full Changelog: v0.11.2...v0.12.0
Thim 0.11.2
- Dispatch generated template registries through a class index instead of linear
==and
instanceofchains. With 422 page models the last model cost about 1.1 µs per request;
every model now resolves in a few nanoseconds. Subclasses of open models still fall back
to the previousinstanceofchain. The new registry also compiles faster: ReAI's
compileJavafor 344 renderers fell from 10.8 s to 6.3 s. - Write the message usage manifest whenever a catalog exists, so
generateMessages=false
keeps build-wide dead-key detection. A module can now render templates from a catalog
whose typed factories another module generates instead of compiling a second factory class.
The module-local unused check that previously ran at compile time is replaced by the
build-widethimMessageUsageCheck. - Record the measurements behind these changes, and the buffer and text-encoding ideas
that were rejected, in the performance audit.
Thim 0.11.0
Thim 0.11 adds the no.beint.thim.settings plugin and supports Gradle Isolated Projects for Kotlin compilation and build-wide template, message and CSS validation.
Add the settings plugin alongside the existing project plugin, both at version 0.11.0. KSP is upgraded to 2.3.11; set ksp.project.isolation.enabled=true so its generated-source wiring works with Gradle's --isolated-projects flag. See the README for complete migration commands.
- Settings and project plugins use separate artifacts to keep KSP off the settings classpath.
- Validation collects declared project artifacts, including non-Thim modules, without cross-project configuration.
- Compiler cache inputs use relocatable paths. Template strictness and unused-message/CSS validation are preserved.
- The full library build passes 102 tests, including Kotlin consumer compilation and configuration-cache reuse under isolation.
All five libraries/plugins and both plugin markers are published to Maven Central. Spring Boot's separate isolated-packaging limitation remains upstream; this release does not justify enabling isolation globally for Boot applications or claim a 30% build-time improvement from isolation alone.
Thim 0.10.2
Constant translations now return their compiled string literal, avoiding a new string on every lookup. The runtime and Spring adapter implementations are unchanged.
- Direct constant-message benchmarks drop from 48 allocated bytes per lookup to effectively zero.
- ReAI's generated message Java is 12.1% smaller and its compiled message classes are 5.9% smaller.
- Locale and regional fallback, references, escaping, empty/Unicode text, parameters, plural/select handling, and null-locale validation retain their behavior.
Validation: 100 library tests and clean builds of ReAI, Utin, Eteo, and Ecomtools. Packaged comparisons match for 399,882 message resolutions, 122,724 reference resolutions, 57,126 null-locale checks, and 24 HTML renderings per version. Runtime and Spring class files are byte-identical to 0.10.1.
Benchmark scope and raw results are documented in PERFORMANCE_AUDIT.md. These are operation and generated-size improvements; no whole-application latency or build-time speedup is claimed.
Thim 0.10.1
Thim 0.10.1 reduces template compilation work and speeds up integer output while preserving the runtime and Spring APIs.
- Indexed source locations: parsing ReAI's 388-template corpus measured about 21× faster.
- Fragment expansion: 30% less time and 64% less allocation on the measured subset.
- Direct integer formatting: about 2× faster, without temporary allocations.
- Reuse opening-tag source locations, validate HTMX 4 QUERY routes, and align Kotlin bytecode with the documented JDK 26 requirement.
Compatibility validation: 98 library tests pass; clean builds pass in ReAI, Utin, Eteo, and Ecomtools. All 41 generated files are byte-identical to their 0.10.0 baselines, and 24 packaged renderer cases produce identical HTML with old and new runtime/Spring jars. HTTP smoke checks cover localization, UTF-8, content lengths, form errors, and escaping.
The measured gains describe specific operations, not total application build or request time. See PERFORMANCE_AUDIT.md for details.