Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Fix Version/s: 1.1.1
    • Component/s: Core
    • Labels:
      None

      Description

      The DataOutputBuffer/OutputBuffer split is unnecessarily baroque.

      1. 4072.txt
        13 kB
        Jonathan Ellis

        Activity

        Hide
        Jonathan Ellis added a comment -

        I was thinking we should avoid the cast since that is not free at runtime, but getData and getLength are typically only called once so you're right, that's premature optimization.

        Committed w/ that change and the comment reformat.

        Show
        Jonathan Ellis added a comment - I was thinking we should avoid the cast since that is not free at runtime, but getData and getLength are typically only called once so you're right, that's premature optimization. Committed w/ that change and the comment reformat.
        Hide
        Sylvain Lebresne added a comment -

        Looks good, +1 with the two following nits:

        • maybe in DOB we could avoid storing the FBOS reference since we can access it through the (protected) out field of DOS (we'll need a cast, but storing 2 refs in the same object to the same object bugs my OCD). Anyway, I'm good with or without that change.
        • in CompositeType.java, there's a mis-indented comment.
        Show
        Sylvain Lebresne added a comment - Looks good, +1 with the two following nits: maybe in DOB we could avoid storing the FBOS reference since we can access it through the (protected) out field of DOS (we'll need a cast, but storing 2 refs in the same object to the same object bugs my OCD). Anyway, I'm good with or without that change. in CompositeType.java, there's a mis-indented comment.
        Hide
        Jonathan Ellis added a comment -

        Patch inlines the relevant parts of OB into DOB. Also replaces FBOS+getBytes with DOB+getData in a couple places that look performance-sensitive-ish.

        Show
        Jonathan Ellis added a comment - Patch inlines the relevant parts of OB into DOB. Also replaces FBOS+getBytes with DOB+getData in a couple places that look performance-sensitive-ish.

          People

          • Assignee:
            Jonathan Ellis
            Reporter:
            Jonathan Ellis
            Reviewer:
            Sylvain Lebresne
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development