falcor icon indicating copy to clipboard operation
falcor copied to clipboard

What does maxSize represent?

Open c0 opened this issue 10 years ago • 1 comments

After reading the docs, I can see that the maxSize option for Model is a number. But what does it represent?

Is it the total kb? or # items?


BTW, I'm glad to open a PR to help update docs after this :D

c0 avatar Apr 08 '16 18:04 c0

@c0 it's not necessarily KB or item count, but can correlate to either if you like. You can attach a $size metadata property to references and atoms that count towards the total cache size. If no size is provided, the default is 50 (except for Arrays or Strings, their length is used instead). So by default, maxSize roughly correlates to item count (itemCount = maxSize / 50), but if you start giving things larger (or smaller) sizes, you can get a bit better control over falcor's memory usage.

trxcllnt avatar Apr 08 '16 23:04 trxcllnt