Optimize graph walk: cache class field list, cleaner path recording, remove unnecessary allocations

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P3
    • None
    • Affects Version/s: None
    • Component/s: tools
    • None
    • jol

      This can be shown with benchmarks from CODETOOLS-7902579.

      Benchmark (size) Mode Cnt Score Error Units
      GraphInstanceBench.onlyCollect 1000 avgt 5 495675.674 ± 36887.568 ns/op
      GraphInstanceBench.onlyCollect:- gc.alloc.rate 1000 avgt 5 1669.318 ± 123.472 MB/sec
      GraphInstanceBench.onlyCollect:- gc.alloc.rate.norm 1000 avgt 5 1301256.217 ± 0.042 B/op

      Parsing Integer[1000] array takes 0.5 us (495 ns/elem) and 1.3M (1.3K/elem) heap space. This is very inefficient and should be improved.

            Assignee:
            Aleksey Shipilev
            Reporter:
            Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: