Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-5947

Factor out common code from generated classes

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 10.10.1.1
    • SQL
    • None
    • Normal

    Description

      There's some code that's added to all classes generated by Derby's query compiler. For example, there are three static fields that contain statistics used to check if the plan is stale, and there are getter and setter methods for each of the three fields. The fields and their accessor methods take up 468 bytes in every generated class.

      We should see if we can factor out some of this code so that there is a single shared copy in BaseActivation. Advantages would be: less complicated byte-code generation, less memory occupied by generated classes in the statement cache, smaller disk footprint for stored prepared statements.

      Attachments

        1. d5947-1a-remove-common-methods.diff
          24 kB
          Knut Anders Hatlen
        2. d5947-2a-execute-method.diff
          10 kB
          Knut Anders Hatlen
        3. d5947-3a-init-rs.diff
          19 kB
          Knut Anders Hatlen
        4. d5947-4a-authorization.diff
          3 kB
          Knut Anders Hatlen
        5. d5947-5a-row-count-stats.diff
          31 kB
          Knut Anders Hatlen
        6. natural-join-after-3a.txt
          3 kB
          Knut Anders Hatlen
        7. natural-join-decompiled.txt
          5 kB
          Knut Anders Hatlen
        8. values1-after-1a.txt
          2 kB
          Knut Anders Hatlen
        9. values1-after-2a.txt
          2 kB
          Knut Anders Hatlen
        10. values1-after-3a.txt
          2 kB
          Knut Anders Hatlen
        11. values1-after-4a.txt
          2 kB
          Knut Anders Hatlen
        12. values1-decompiled.txt
          3 kB
          Knut Anders Hatlen

        Issue Links

          Activity

            People

              knutanders Knut Anders Hatlen
              knutanders Knut Anders Hatlen
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: