Web Core Application Memory Usage

Greetings,

My application consists of multiple pages. Roughly every page contains a continuous scroll component. In the GetListItem event, close to 30 unique buttons are declared and created along with their respective OnClick procedures. The page size is set to 10, so every page call results in roughly 300 new buttons, along with a few integers and strings which are insignificant compared to the buttons imo. Also, the GetListItem event code block itself is pretty long; ~1.000 lines

Every time I call a page, on average, the memory usage in the task manager goes up with ~25 mb. After 4 pages or so, the browser, doesn't matter which one, reacts way too slow already. I'm not even talking about smartphone performances..

I can't free any of the created objects, because all of them are needed. So, apart from freeing, what suggestions do you have to boost the performance?

Kind regards.

Is the GetListItem event code unique for each item or can this be centralized?
Other than this, if you keep thousands of HTML elements live in the DOM that has its cost and the only way to reduce this cost is to remove these from the DOM.

1 Like

Greetings,

About being unique: every item contains the same code, e.g. clicking button A of item index 0 is the same as clicking button A of item index x. The only difference is that every item is like a different Tweet: liking one Tweet executes the same code as liking another Tweet, but results in a different 'total like value', etc. To be totally honest, I don't know if i can call this unique or not, so you can decide in my stead :smile:.

About your other suggestion, going further with my example given above, I can't remove the Like buttons, or really any button, of the previous 'Tweets'.

I've included a snapshot of the test environment.

Basically, this is what the application looks like.

When I check this with our ContinuousScroll demo and load thousands and thousands of items, I see actually NO memory increase at all for Chrome.
So, there must be something special you are doing and we would need more details.
I suggest to try to isolate this and send a sample source project with which we can reproduce such high memory increases.