# Custom Object vs Dictionary

**URL:** <https://forum.xojo.com/t/custom-object-vs-dictionary/18591>\
**Category:** General\
**Created:** [August 14, 2014, 11:20am UTC](https://forum.xojo.com/t/custom-object-vs-dictionary/18591 "2014-08-14T11:20:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Grant\_Singleton](https://forum.xojo.com/letter_avatar_proxy/v4/letter/g/b38774/32.png) [@Grant\_Singleton](https://forum.xojo.com/u/Grant_Singleton)\
**Post date:** [August 14, 2014, 11:20am UTC](https://forum.xojo.com/t/custom-object-vs-dictionary/18591/1 "2014-08-14T11:20:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kem\_Tekinay](https://forum.xojo.com/user_avatar/forum.xojo.com/kem_tekinay/32/154_2.png) [@Kem\_Tekinay](https://forum.xojo.com/u/Kem_Tekinay)\
**Post date:** [August 14, 2014, 11:37am UTC](https://forum.xojo.com/t/custom-object-vs-dictionary/18591/2 "2014-08-14T11:37:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Grant\_Singleton](https://forum.xojo.com/letter_avatar_proxy/v4/letter/g/b38774/32.png) [@Grant\_Singleton](https://forum.xojo.com/u/Grant_Singleton)\
**Post date:** [August 14, 2014, 12:05pm UTC](https://forum.xojo.com/t/custom-object-vs-dictionary/18591/3 "2014-08-14T12:05:24Z")

</div>

Thanks Kem. I think I’ll leave it as is, and write method(s) to suit my needs.

Cheers  
Grant

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 5:22pm UTC](https://forum.xojo.com/t/custom-object-vs-dictionary/18591/4 "2020-10-29T17:22:28Z")

</div>


