Skip to content

1.3.0

Choose a tag to compare

@github-actions github-actions released this 29 Nov 17:14
b48415e

Shares the compiled validators of the packaged rules between all Paniolo instances of a class
loader, adds Paniolo.validatorCacheCapacity() and Paniolo.validatorCompilationLimit() and
compiles rule sets faster. See the API reference for 1.3.0.

Fixed

  • Several separately built Paniolo instances with the same configuration each compiled and held
    their own copy of the rules. With eight instances and a 512 MiB heap, the JVM kept reclaiming the
    softly held copies and the instances spent nearly all their time compiling the same rules again:
    about 80 instead of more than 3,500 validations per second, with a 95th percentile of about
    780 ms. The validators of the packaged rules are now shared by all instances of a class loader,
    compiled once and held strongly up to a capacity; the same load reaches about 3,850 validations
    per second, as fast as one shared instance.

Added

  • Paniolo.validatorCacheCapacity() and the system property paniolo.validatorCache.capacity:
    the number of compiled validators of the packaged rules all instances hold together; by default
    one per 64 MiB of maximum heap, at least 4 and at most 32. Validators beyond the capacity are
    dropped least recently used first, referenced softly and taken back while the heap has room.
  • Paniolo.validatorCompilationLimit() and the system property
    paniolo.validatorCache.compilationLimit: the number of different validators compiled at the same
    time, by default 1, so the temporary heap of several compilations does not add up. Requests for
    the same validator wait for one compilation; validation itself is not limited.
  • Tests for the shared cache (SharedCacheTest, SharedValidatorsTest): one compilation per
    validator for eight cold instances, failed compilations, the compilation limit, nested requests,
    eviction, separation of severity modes, rule statistics and configured rules, XRechnung revisions
    validated in parallel, equally named rule directories with different rules, 1,000 discarded
    instances, and that the cache does not keep instances, results or reports reachable.

Changed

  • Validators of rules configured with the builder (rules(Path), facturXRules(Path),
    extendedCtcFrRules(Path), orderXRules(Path), despatchAdviceRules(Path)) are still compiled
    per instance and held softly; only the packaged rules are shared.
  • Compiling a rule set is faster: the unused svrl:fired-rule elements are now removed from a
    Schematron stylesheet in one pass instead of one by one from a live node list, which walked the
    stylesheet again after every removal. For the Factur-X EXTENDED rules (about 1,000 elements) this
    step takes about 2 ms instead of 170 ms, and the whole compilation about 810 ms instead of 940 ms;
    Factur-X EN 16931 about 500 ms instead of 540 ms. The compiled rules are unchanged
    (StreamlineTest compares the prepared stylesheets of every packaged rule set with the earlier
    result).

Verification

The JARs are published to Maven Central with GPG signatures. This release carries for every
module the SBOM (*-cyclonedx.json), the SHA-256 checksums of all files (SHA256SUMS), the
OWASP Dependency-Check report of the release build, the test evidence of the release run
(*-test-evidence.tar.gz, *-test-evidence.json, SHA256SUMS-test-evidence), and a build
provenance attestation of GitHub. The build is reproducible; see Verifying a release.