Issue with Optimize Application feature failing for large Bubble applications

Hi folks,

I have, what I think, is a large application for Bubble – it’s over 400k lines of JSON (8.4 MB when downloaded). Whenever I attempt to run the “optimize application” feature it always hangs for a while and then crashes. Even if I select only one or two items to delete. Has anyone experienced this? If so have you remedied the problem?

Thank you!
Dan

8.4 M isn’t especially large for an export.

Optimize runs locally in your browser. Use a fresh Chrome profile and no other tabs so you don’t have the Chrome bloat of extensions etc to give you the best chance of success.

This post is helpful Optimize application: any gotchas?

A lot of people with big or old apps have the same issue. So there is no workaround for now. I tried even with a 36GB mem device in incognito mode.

2 Likes

Apparently the team is working on an improved version. Apparently.

Try closing all the other bubble tabs, open the editor in a new tab, and then run “optimize application”.

FYI: if you want to do some manual clean up, here is a way to find unused endpoints: Find all unused endpoints in your app - #3 by rico.trevisan

hey there @lindsay_knowcode - thank you for the suggestion! Much appreciated. I gave it a go, fresh Chrome profile and a reboot of my mac, but still ran into the crashing issue. :-/ I’ll keep at it.

@rico.trevisan - Excited to try this! When I run find-unused-endpoints.sh tables.bubble I get an empty result set returned.


bin % zsh find-unused-endpoints.sh tables.bubble

ID  Type  Name

I’ve also noticed that when I download my .bubble file, it is no longer in JSON format. Just a single line of text (8.25 million characters long). Is that what your application is expecting?

Got it! Based on your suggestions, I decided to try Safari instead of Chrome. It worked perfectly. Thanks again.

1 Like

I guess you have 0 unused endpoints. At least by little script standards.

The .bubble file is a json file. JSON is just a long long string. You can try this in your terminal to pretty print it to the screen.


jq . tables.bubble

Or to save it to a file.


jq . tables.bubble  > tables.bubble.json

Our export is currently 29.5mb, enough text to make any text editor slow. I’m afraid to try to optimize for fear of irreversible damage. The design of bubble wasn’t meant to handle large applications. But with so much time invested, It’s like carrying a ball and chain. Would take a team of engineers to replace it. Or maybe one good AI agent :stuck_out_tongue:

@jaydc - Wow! That’s pretty damn big. What type of solution have you built?

Thanks @rico.trevisan! I’ll keep using your script, it’s really cool. Thanks for sharing.

1 Like