JADE  Environment Development Ideas

Add external methods on JadeDynamicObjects for efficiency

Our usage of JDOs requires us to iterate properties to find properties by name, and to call multiple get methods for the same property. I expect we'd get better performance if JDOs had external methods such as findPropertyByName(name : String) : Integer and getPropertyNameTypeAndValueByIndex(index : Integer; name : String output; type : Type output; value : Any output) : Boolean and getPropertyTypeAndValueByName(name : String; type : Type output; value : Any output) : Boolean, where the return Boolean values would indicate success of finding by name.

  • Chris Power
  • May 24 2019
  • Executing
  • Attach files
  • Admin
    Hugh McColl commented
    December 20, 2019 00:18

    Presumably you want the findPropertyByName(name : String) : Integer method to return the index of the property if found or zero if not?

    Would you be happy with two new methods similar to the ones you suggested:

    • getPropertyInfoByName(name: String; index: Integer output; type: Type output; value: Any output) : Boolean

    • getPropertyInfoByIndex(index: Integer; name: String output; type: Type output; value: Any output) : Boolean

    Where getPropertyInfoByName returns the index of the property if found?

  • Gerard O'Brien commented
    December 20, 2019 00:58

    Yes, spot on Hugh.

    It'd be great.

    Cheers

  • Chris Power commented
    05 Jan 17:33

    Yes, that'd do the trick.