ObjectOutputStream replacement table search is linear

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 1.3.1
    • Affects Version/s: 1.3.0
    • Component/s: core-libs
    • None
    • ladybird
    • generic
    • generic
    • Verified

        ObjectOutputStream currently records replaced objects (i.e., those which have
        been returned by a call to ObjectOutputStream.replaceObject() or a
        class-defined writeReplace() method) in the object array replaceObjects[]. In
        order to determine whether or not an object has a replacement,
        ObjectOutputStream performs a linear scan of the table (see
        ObjectOutputStream.lookupReplace()). If the number of replaced objects is
        large, the overhead of this search becomes prohibitively expensive--for each
        new object serialized, ObjectOutputStream will scan the entire array for a
        match before concluding that there is none.

        The replacement table should be replaced with a hash table similar to the one
        used for wire handle lookup.

              Assignee:
              Michael Warres (Inactive)
              Reporter:
              Michael Warres (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: