I have a single page app that loads some data into a hidden repeating group (all the users tasks) I then will use that list and filter it to show various tasks in different views for the user throughout the app.
Regardless of whether I use the above method, loading all the data and then filtering client side (which helps reduce WU usage) or if I use “Do a Search For” every time I want to show the data in different views (which uses more WU)
Both methods result in run-away memory usage until the tab maxes out (usually around 4.5GB) and crashes.
I thought maybe my app was too complex, so I created a separate page with a very simple setup. A RG that loads all the data (250ish records) and a handful of other groups and RGs that present lists by filtering that original data.
Similar results. Even without using the app and just letting it sit there, the memory will start to grow and grow, sometimes resulting in a crash.
I’ve tried lots of things on the Bubble side, clearing lists, resetting Repeating Groups, hiding and collapsing objects. Nothing seems to help.
Has anyone experienced this kind of thing? Anybody have any ideas to try to manage runaway memory usage? I’m at a bit of a loss for what could be causing it.
If you load too many things (especially at once) the page will crash like this.
This is quite a bit at once… and if this has “heavy” fields this could make it even worse. What kind of fields does this have?
Also have you confirmed it’s 250? I’ve seen it before where a search has “Ignore empty constraints” and a very important constraint goes empty and loads the entire database to the client by accident
The data type has about 25 fields, one of which is an image field, but is rarely used. I may have to rethink how Im structuring everything, like using a satelite record type instead — though I imagine I would still run into similar issues if I want to try to load this many records at once … At least the records would be more light weight.
I suggest using a satellite dataType as well as a state on the page with a list of numbers. That way you can show the list instantly and then let it pull in the values slowly from the database. I did this to optimize my Legend of Zeldinia game for it to work. It worked well.
Can you describe that a little more? I understand the part about using satelite data types — but you would create a custom state on an element in the page and store a list of numbers in it? What numbers did you store? Im not sure I understand how that connects. Thank you!
A JSON export of all 246 of those story records is only 48kb … is that an accurate way of determining their size? They don’t really contain very much information.
In your simple page example… have you broken the problem down to it’s simplest form by stepping it through as you build out your groups. For example:
Adding the RG loading the items. Does it display the symptoms?
Adding the first nested group. Does is display symptoms?
Add the first nested filter. Does it display symptoms?
Etc
At which point does it break?
It may not solve your issue but just like you’ve moved/tested away from your existing SPA to remove variables, next I would simplify this further (if you can)
Sure. So you can use the list of numbers from the toolbox plugin and just display a list of all the numbers in the repeating group. Then you can do a search for each item # ‘current cells number’ to display the data.
Does that make more sense?
Let me know if you need me to make an example for you.