Skip to content

Avoid duplicate schema source readers - #968

Merged
iuliiasobolevska merged 1 commit into
masterfrom
fix/avoid-duplicate-schema-readers
Sep 23, 2026
Merged

iuliiasobolevska merged 1 commit into
masterfrom
fix/avoid-duplicate-schema-readers

Conversation

@iuliiasobolevska

Copy link
Copy Markdown
Collaborator

Summary

  • discover filesystem, inline, and dependency-jar schema sources once per CodeGen instance
  • open dependency jars once to load both schemas and type mappings, with deterministic closure
  • rebuild readers only after syntax failure and include dependency-jar schemas in diagnostics
  • preserve the public CodeGen(CodeGenConfig) interface while exposing an internal synthetic test seam

Benchmark

A successful 2,001-file schema workload was run in seven alternating fresh JVMs against master and this branch using the installed CLI distribution. Median wall time improved from 0.55 s to 0.50 s (about 9%). The lifecycle regression test verifies the stronger invariant directly: one filesystem reader open/close per schema on success.

Verification

  • ./gradlew :graphql-dgs-codegen-core:test :graphql-dgs-codegen-core:integrationTest :graphql-dgs-codegen-core:lintKotlin
  • 173/173 CodeGenTest tests pass; no module failures
  • adversarial review found no issues
  • public bytecode still exposes CodeGen(CodeGenConfig) and generate() unchanged

@iuliiasobolevska iuliiasobolevska added the bug Something isn't working label Sep 23, 2026
@iuliiasobolevska iuliiasobolevska added the bug Something isn't working label Sep 23, 2026
@iuliiasobolevska
iuliiasobolevska force-pushed the fix/avoid-duplicate-schema-readers branch from 154d285 to 939e671 Compare September 23, 2026 19:55
@iuliiasobolevska
iuliiasobolevska merged commit 5b5eaf1 into master Sep 23, 2026
2 checks passed
@iuliiasobolevska
iuliiasobolevska deleted the fix/avoid-duplicate-schema-readers branch September 23, 2026 20:00
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