Details

      Description

      For many queries, a deep Striterator process stack can become limiting both in stack space and CPU burden.

      Several Striterator patterns seem amenable to an optimisation akin to function call tail optimisation. An experimental implementation indicates that this approach is worth further investigation.

        Activity

        Hide
        martyncutcher martyncutcher added a comment -

        A new interface ITailOp can be implemented by source iterators supplied to a Striterator. This provides a single method to allow parent Striterators to retrieve a potential tail optimisation. A simple example would be an Appenderator that could return the second Iterator or an Expanderator that could return the final expanded child iterator. Also, the standard Striterator, once it has had filters added to it can return its source Iterator as an optimisation.

        Show
        martyncutcher martyncutcher added a comment - A new interface ITailOp can be implemented by source iterators supplied to a Striterator. This provides a single method to allow parent Striterators to retrieve a potential tail optimisation. A simple example would be an Appenderator that could return the second Iterator or an Expanderator that could return the final expanded child iterator. Also, the standard Striterator, once it has had filters added to it can return its source Iterator as an optimisation.
        Hide
        martyncutcher martyncutcher added a comment -

        ITailOp is currently implemented by the Expanderator, Appenderator and base Striterator classes. This can have a significant effect on reducing stack growth and CPU.

        Fix committed to version 2437.

        Show
        martyncutcher martyncutcher added a comment - ITailOp is currently implemented by the Expanderator, Appenderator and base Striterator classes. This can have a significant effect on reducing stack growth and CPU. Fix committed to version 2437.

          People

          • Assignee:
            martyncutcher martyncutcher
            Reporter:
            martyncutcher martyncutcher
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: