Class MergePages


  • public final class MergePages
    extends Object
    This class is intended to be used right after the PageProcessor to ensure that the size of the pages returned by FilterAndProject and ScanFilterAndProject is big enough so it does not introduce considerable synchronization overhead.

    As long as the input page contains more than MergePages.MergePagesTransformation.minRowCount rows or is bigger than MergePages.MergePagesTransformation.minPageSizeInBytes it is returned as is without additional memory copy.

    The page data that has been buffered so far before receiving a "big" page is being flushed before transferring a "big" page.

    Although it is still possible that the MergePages may return a tiny page, this situation is considered to be rare due to the assumption that filter selectivity may not vary a lot based on the particular input page.

    Considering the CPU time required to process(filter, project) a full (~1MB) page returned by a connector, the CPU cost of memory copying (< 50kb, < 1024 rows) is supposed to be negligible.