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

Intern yang.model.api.PatternExpression

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Medium
    • Resolution: Done
    • None
    • 8.0.0, 7.0.10
    • model-api, parser
    • None

    Description

      After addressing YANGTOOLS-1067 we are pretty much in a place where we have squeezed pretty much all generic memory efficiency.

      Examining the heap dump from a Junus 19.3 model run, we still have a rather large number of duplicate objects, but these seem to be coming from duplication inherently present in the model sources.

      There is a single outlier, which is PatternExpression – these are immutable String holders, for which which one of the strings comes from models, and thus is already deduplicated by our IR parsing pass. The second String is the adjusted Pattern string, which we derive.

      Improve the situation by interning PatterExpressions, reducing memory footprint in this particular use case by about 2%.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: