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

Rework NodeIdentifierWithPredicates

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Medium
    • Resolution: Done
    • None
    • 4.0.0
    • None
    • None

    Description

      Heap dump analysis from CONTROLLER-1898 shows that a typical openflow-related workload does not use more than one predicates anywhere – every one of the 1.4M objects has exactly one predicate.

      This translates to 1.4M SharedSingletonMap instances, each costing a 24 bytes of storage – for a total of 34MiB, i.e. 3.7% of total memory footprint.

      Current layout of NodeIdentifierWithPredicates results in 32/40 bytes per instance, with 7 bytes being wasted on alignment – hence we could inline the single key/value eliminating the need for retained secondary objects.

      While straightforward, this will result in a Map, which will not retain a cached hashCode, hence is subject to trade-offs and further design.

      Irrespective of that, we need to turn this class into a non-final value-based object, i.e. eliminate all of its public constructors, so that users are no longer strongly connected to its design.

       

      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: