698 views
in GUI Development by
I have a vertical list of dynamic content.

For the "onLoadItem" slot I call a method to request the content to be loaded by another thread ... bla bla bla (that doesn't matter). Long story short: It works.

To display the data as quickly as possible I realized that the list - already and per default of the mosaic framework - has an internal buffer/cache to store some object not directly in view. For those items the "onLoadItem" slot gets called already. Perfect. I just wanted to know if it is possible - and how - to increase the size of this buffer/cache.

FYI: I know that this buffer is kind of like an array and those array entries are reused when scrolling. I did already account for that.

1 Answer

0 votes
by
 
Best answer
Hello,

the cache size is determined automatically depending on the number of items visible within the list. Overriding this value is not possible. What is the reason for your intent to change this cache size?

Best regards

Paul Banach
by
Just that it is more perfomant if I get more of those data for the views in one go. (better to get data vor views 1-15 instead of 1-6, user scrolls a little, then get 7-12, user scrolls further, then get 13-15)

But ok. If that is not possible I will work around this by buffering the data within the EmWi RAM myself.

Thanks.
by
Hello,

It is in fact a compromise. Small cache needs to be updated much often. With a larger cache, it takes longer for new items to load. As consequence with big cache the scrolling will stock when compared with small cache. In order to achive good performance it is thus important to optimize the loading operation as much as possible and not to load too much items at once (to have a small cache).

Best regards

Paul Banach

Embedded Wizard Website | Privacy Policy | Imprint

...