What is memory intensive?

Hi,

I’m trying to find a memory leak (or something) where my production app seems to be very hungry for ram. It start fine around 0-200mb, but ends up in the 1-3gb range after a few minutes of navigation, with not a lot of data.

I’m wondering if you know what the typical suspects are in Weweb?

Hi @Kawwl

Do you have a lot of flexboxes or animations in your app? This can cause performance issues.

Well, I think I’m almost exclusively using flex… But there’s not that many elements per page.

Very few animations are used.

Tried staying idle (keeping the app open) to do a heap snapshot and was hit with this, Memory usage at 2.4GB:

Never read a heap snapshot before…
Bu it looks like it might be the mapping and functions that really hurts. I am kind of hestitant to think the mapping is that complicated. I mean, i could potentially try to simplify the app on this, but it’s not really a lot I’m doing.

Is weweb using map for the collection lists?


Currently sitting at 3.1GB.

EDIT: Looking through my app I’m not actively using a lot of map function in neither js or formulas.
Is there anything in WeWeb that does this?

Hi @Kawwl how is this coming along for you? Did you make any changes that improved memory usage?

Usually this happens when there is a memory leak somewhere. Also logs in the Editor can cause to huge memory leaks, because they’re badly implemented. Especially in big apps, the amount of logs is crazy and apparently WeWeb doesn’t use a virtual scrolling for them.

It’s kinda hard to pinpoint, since every app is different.

Sadly, i had to leave it like this.

I did a lot of different changes trying to get the memory to go down, but I haven’t really found any big successes. I have been looking at realtime, maybe some sockets not closing, and UI elements. I got the memory down a little, but it’s still “too much” for what the app is doing.

I have asked for help as using WeWeb editor to find leaks has been challenging. But the team is understandably busy.

For now I just keep building, and will revisit this, or buy help.

In the editor, clearing the logs every now and then works.