Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-88

Binding DTOs: improve equals() implementation

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Resolution: Done
    • None
    • 7.0.0
    • Binding codegen
    • None
    • Operating System: All
      Platform: All

    Description

      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

      Attachments

        Issue Links

          # Subject Branch Project Status CR V

          Activity

            People

              vladyslav.marchenko Vladyslav Marchenko
              rovarga Robert Varga
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: