How memory efficient is object attribute compaired to object value?

how much efficient is object attribute compared to its legacy object value instance? by a percentage

(I do also have another post about value instances but idc)

no exact percentage exists for this, but attributes are lighter since a ValueObject is a full Instance with its own overhead, while an attribute is just a key in a table, no extra object created

barely matters for a few values, but at scale attributes win on memory and won’t clutter your explorer

if you want a real number just stress test 1000 IntValues vs 1000 attributes and check the memory tab yourself

3 Likes

so I tested this and the object attribute was harder to render but idk which one was memory heavy since they seemed the same

yeah makes sense, at small scale the difference is basically margin of error, only shows up once you’re doing hundreds/thousands of them. and for the “harder to render” part, i’m guessing you mean checking memory usage, since attributes don’t show up as separate instances in the explorer like ValueObjects do, so you’d need to actually profile before/after instead of eyeballing it