Skip to content

4.97.0

Choose a tag to compare

@jdereg jdereg released this 08 Mar 23:06
· 380 commits to master since this release

Highlights

  • ToonReader performance optimization release — systematic hot-path improvements reducing per-line allocations, autoboxing, and field access overhead across the TOON parsing pipeline.
  • Jackson test dependency updated from 2.19.4 to 2.21.1.

Performance

  • ToonReader.peekLine() — avoids materializing a String for blank, comment, and indent-only lines, reducing per-line String allocations by ~50%.
  • ToonReader.cacheSubstring() — simplified to reduce code complexity and improve maintainability of the string caching layer.
  • ToonReader.parseNumber() — integer fast path now avoids autoboxing by returning primitive values directly.
  • JsonObject — index build deferred to first lookup instead of construction time; ToonReader.lineBuf localized to reduce field access overhead.
  • ToonReader.cacheSubstring() — inlined at hot call sites; frequently accessed fields (stringCache, classLoader) localized to reduce field dereference cost.
  • ToonReader.readInlineObject() — char comparisons optimized; stringCache array localized to a local variable in hot parsing methods.
  • ToonReader — cache arrays (stringCache, numberCacheKeys, numberCacheValues) now reused across parse calls via ThreadLocal, eliminating per-parse array allocation.
  • ToonReader.trimAsciiRange() — fast path that skips trim logic when the input range is already trimmed.
  • ToonReader.parseNumber() — number cache arrays localized to reduce field access in the hot number-parsing loop.
  • ToonReader.readInlineObject() — two separate indent checks merged into a single != comparison.

Maintenance

  • Update Jackson test dependency from 2.19.4 to 2.21.1; remove redundant jackson-core and jackson-annotations declarations (pulled transitively via jackson-databind).

Install

Maven

<dependency>
  <groupId>com.cedarsoftware</groupId>
  <artifactId>json-io</artifactId>
  <version>4.97.0</version>
</dependency>

Gradle

implementation 'com.cedarsoftware:json-io:4.97.0'