Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-2106

Improve SegmentedJournalReader performance

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Medium Medium
    • 7.0.12, 8.0.5, 9.0.1
    • None
    • clustering

      SegmentedJournalReader has two modes of operation based on JournalReader.Mode, which is an invariant known at instantiation time. We do not amortize this invariant, leaving each invocation of SegmentedJournalReader.hasNext() checking it all over again.

      Since Java is an object-oriented language, we can express this invariant in the class hierarchy by having two implementation classes – one for Mode.ALL and one for Mode.COMMITS. This will not only simplify the code, but also allow the JVM to see what is going on.

      While we are in this area, also explore other optimization opportunities.

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

              Created:
              Updated:
              Resolved: