Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-3722

Eagerly Initialize Instance Variables in Ruby Implementation

    XMLWordPrintableJSON

Details

    Description

      Ruby 3.2 introduced an inline cache scheme based on the "shape" of an object.  The object's shape depends on what instance variables were set on the object and in what order.  Lazily initializing an instance variable can cause poor inline cache performance because the order in which the IV is set may not be predictable.

      The Ruby version of Avro has an IV that is lazily initialized, and I would like to eagerly initialize it so that we can improve cache performance.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tenderlove Aaron Patterson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m