Hi everyone!
I’m contemplating changing my Valentina DB app to use Dictionaries to store properties rather than a custom object with predefined properties. I’m about to upgrade my app with some major functionality and it certainly would be easier to use a Dictionary.
Are there any memory concerns or performance issues. (WIN7)
Would there be any issues using a Dictionary containing Dictionaries?
Cheers
Grant
Accessing defined properties is faster than accessing items in a Dictionary. Dictionaries are very fast, but there is still a calculation involved to perform the lookup.
Dictionaries will use more memory. I don’t recall the exact amount, but it’s something like 40 bytes overhead per entry.
Dictionary values can be anything, including other Dictionaries. However, unlike with custom classes, auto-complete will be of no help to you.
None of this is to say “don’t do it,” just to make you aware of the potential issues.
Thanks Kem. I think I’ll leave it as is, and write method(s) to suit my needs.
Cheers
Grant