Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-1252

Improve SharedSchemaContextFactory

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: High High
    • 7.0.0
    • None
    • parser

      SharedSchemaContextFactory is widely used for caching context. Unfortunately it has a major deficiency around first computation: if multiple requests enter resolution process, we end up computing the schema context concurrent and only deduplicate it afterwards.

      Refactor the implementation to remember futures, so concurrent accesses end up waiting for the initial computation to finish. This requires some fancy dance around references, as the indirection in cache values will mean that soft references will clean up on Future not being referenced, rather than the context not being referenced.

            rovarga Robert Varga
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: