Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-470 Add DataObject default methods
  3. MDSAL-149

Binding DTOs: improve equals() implementation

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Duplicate
    • None
    • None
    • Binding codegen
    • Operating System: All
      Platform: All

      +++ This bug was initially created as a clone of MDSAL-88 +++

      Our current equals() implementation visits each child node in alphabetical order. While this is correct, finding inequalities may take significant time, as we bore recursively into objects.

      Since the order of comparison does not determine the result of equality comparison, we can speed up detecting degatives if we employ some smarts. Those smarts is that some types can be compared more quickly than others, simply because they are terminal nodes.

      Teach the DTO generator code to recognize the types being compared and perform the following ordering:

      1) numeric types (boolean, byte, short, int, long, biginteger, bigdecimal), identityrefs
      2) string, binary, bits
      3) instance identifier
      4) all other (e.g. composite) types

            Unassigned Unassigned
            martin.ciglan Martin Ciglan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: