Skip to content

optimize javadoc escaping - #1007

Merged
iuliiasobolevska merged 1 commit into
masterfrom
fix/javadoc-escaping-performance
Nov 13, 2026
Merged

iuliiasobolevska merged 1 commit into
masterfrom
fix/javadoc-escaping-performance

Conversation

@iuliiasobolevska

@iuliiasobolevska iuliiasobolevska commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

JavaDoc escaping introduced in #984 for #772 scans every description and repeats work for field, getter and builder documentation. Return ordinary descriptions unchanged, restrict markup parsing and Unicode regex scans to relevant input and reuse escaped descriptions within each generator instance. The HTML, inline-literal, comment-terminator and Unicode escaping rules remain unchanged.

Local comparison against 88728bd6, using the same large-schema fixture and byte-identical third-party dependency jars:

Workload Before median After median Change
Construct, parse and generate without writes 525 ms 400 ms -23.8%
Construct, parse, generate and write files 1,118 ms 1,039 ms -7.1%

JDK 17, G1, a 2 GiB maximum heap and eight writers; two fresh JVMs per variant with six warmups and ten measured iterations each, in before/after/after/before order.
The improvement repeated in both fork comparisons, although write-inclusive timing ranges overlap.
Main-thread allocation fell by 41 MB without writes and 56 MB with writes.
All 9,952 generated source and example files (41,945,234 bytes) are byte-identical and share the same path-and-content SHA-256 digest.

@iuliiasobolevska
iuliiasobolevska merged commit b79591a into master Nov 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants