Save JSON Strings as a List for Saving WU

Hey guys,

im about to optimize my app to save more WU and i need some input. So my app can import a linkedin search url which cost a lot of WU for each search.

Im thinking about saving the Data in text lists as JSON String. Therefore it only costs 0.62 WU per created Search and i could extract certain elements with Regex instead of saving the Data into each Column.

Im not displaying any data on the frontend.

The question is are there any potential downsides / Performance issues in the Backend by doing this when im Searching for Certain Elements with a Database getting bigger and bigger? It would be like 1000 Rows but within the 1000 Rows i also have 1000-2000 Items.

Would be nice to hear your Opinion before i change my whole Database Structure.

You know that you can save result of API connector set as Data into a field in your DB exactly like if this was a related DB? No need to use regex and you can read it like if you was calling api connector…

3 Likes

JSON is actually a quite useful way to save on WU.

I’ll give you an extreme example of how I’ve recently used it.

We have a client app that does large calculations, we built the calc engine externally due to it needing to run thousands of calculations. Think month by month revenue projection excel sheet but hundreds of things to calculate not just revenue. Since it needs to reference a prior month to calculate the next month you can imagine there would be an insane WU cost with saving all those objects in bubble.

What we did was have the custom built calc engine return arrays inside the JSON of the values, instead of storing objects in bubble now we just store the whole JSON output.

From there we use regex to extract the values as needed from the JSON to display on page or extract data to process workflows on bubbles side.

We went from bubble being completely unviable on a product the client built already to costing next to no WU to run.

6 Likes

I think you didnt read my Post :smiley: I know that you can do that.

Its about saving WU. Create 2500 Rows = 2500 WU or create single row for 1 WU?

What I’m suggesting is not to create 2500 rows. Is to store the whole payload in a single fields

Create a DB, add a field, and select the data type of your API Connector in the type dropdown. Use Get data from API t store the whole result of the API call. 1 items. one field. that’s all.
You can use one item for each month and call the previous month item this way that store the previous month data into a single field.

Having to regex a list of JSON text records with 1000-2000 items each can create a very noticeable delay in the frontend, with the consequent degradation in UX.

Having the data properly structured in DB allows for faster searches, especially if they are frequent and table indexes are created internally by Bubble. Also, allows for search constraints, that reduce the number of returned results and so the WU spent.

How you design the system depends on how frequently you expect the user will search through the DB records and how big you expect the table is to become. The bigger the latter two factors, the more reasons you have to save it all structured in DB.

For your particular use case, as you mentioned that the user is performing LinkedIn searches under the hood, it sounds to me like volatile searches, i.e. records consulted once and never again. So, using JSON and regex, as long as you properly handle the search delays in the frontend, sounds like a suitable solution to me.

1 Like

Isn’t still the json response stored? Just it looks visually better and is more usable.

Anytime you do a search which returns this field, you are going to incur the cost of retrieving the characters in it.

Same thing if you store the whole JSON. And this is a lot less than Create and search for all things you need.

Imo Bubble should natively integrate with Supabase to boost their evaluation and get rid of handling postgres entirely,

It will be much cheaper for bubble to exist by itself and we’ll only have a nice frontend and workflow builder.

I’ve moved my app 50% to Supabase and CF workers and my WU are close to zero for otherwise what would cost hundreds of $ per month in native Bubble

Yeah, this I what I mean. You save the whole Json. But if you want to extract the Parameter, you need to extract Them with regex.

I would also love to do that. But supabase is a bit top overwhelming for me right now. Im thinking about shifting to Xano.

But first of all I want to create a Solid userbase, with a Pipeline of Leads before shifting

No!
You access data exactly the same way that if you was calling API directly
Example: API data’s Created date

Here’s an example:
screenshot-bubble_io-2025_03_21-15_22_40
screenshot-bubble_io-2025_03_21-15_23_03

Ah okay, I get what you mean. If I Display data in the frontend calling my own API is the Way to go!

But im Not displaying any data in the frontend anyway but only in the backend

It does’t change anything. I show you in UI, but you can access data the same way in backend.

Do exactly this - I switched to Xano for a backend, and it has been a lifesaver. As someone making a B2C app that is yet to go live (this would have happened ~2 years ago, but the pricing changes made this impossible for me, as a self-funded startup).

Use the Xano Connector plugin (or fork it like I did to create more functionality), and do the heavy lifting in Xano. Lambda, map, iterations, conditionals - all the functionality missing from bubble workflows is trivial to achieve in Xano. Best of all - the Xano connector runs client-side in the browser, so the WU cost is trivial! I would still use APIs in workflows for updates though to handle conditionals - and these will still cost, so you should instead have any data changes done on the Xano end. If you have authentication for your app, still use the local bubble DB for “Current User” (e.g. storing session token, and to allow privacy rules) - but use Xano for everything else.

Don’t delay in switching though - converting your workflow logic into Xano APIs is VERY time consuming - my app needed around 60 API endpoints to be created. The resulting performance was incredible though (local Xano server too) - page time loads went down from about 14s (sometimes >70s depending on bubble servers) to <2s. Data refreshes take about 15ms.

With all this said… I have yet to find a better front-end solution to replace bubble, so I believe at this point - bubble + Xano is really the best no/low-code option out there. But with the WU cost model, if you expect to have any amount of non-paying users (e.g. the public) - avoid anything involving bubble database (you can use option sets though, as these are loaded into the page), or server side actions/backend workflows, and minimise the workflows to only client-side functions (e.g. “filter”), and only “Do a search for” on a unique ID (stored in your Xano data) if you need to map something out for the absolute minimum WU cost, since unique ID are indexed in the bubble DB behind the scenes, so are the lowest cost possible.

Thanks for your Input. This is really helpful. I also want to switch the backend as soon as possible. But its time consuming and id like to build Marketing and leadgeneration as soon as possible. I spent half a year Building my App and its frustrating to realize that its not profitable.
I just want to Optimize is to the Point I cant lower the WU consumption. I want to do Marketing now xD
When Im earning a bit id Look for freelancers to help me migrating. Lets See how everything is going.

Within the next two months I’ll have a free blogging template that uses my new approach to building in Bubble. Some WU savings are insane, but overall, I can do everything for less with my new approach to building.

3 Likes

Awesome! Add me to your newsletter! Id like to get a notification when its out.

Hey. Could you please sho me in detail when you mean? So i have saved this json. Here an example of the First json Object: {“object”:“UserRelation”,“connection_urn”:“urn:li:fsd_connection:ACoAABk77VsB8bsAyRZhZmyWqJS0DDwk3dpnAq4”,“created_at”:1667472279000,“first_name”:“Tobias”,“last_name”:“Schanze”,“member_id”:“ACoAABk77VsB8bsAyRZhZmyWqJS0DDwk3dpnAq4”,“member_urn”:“urn:li:fsd_profile:ACoAABk77VsB8bsAyRZhZmyWqJS0DDwk3dpnAq4”,“headline”:“Fullstack Developer bei Ninjaneers GmbH”,“public_identifier”:“tobias-s-877946b9”,“public_profile_url”:“https://www.linkedin.com/in/tobias-s-877946b9/",“profile_picture_url”:"https://media.licdn.com/dms/image/v2/C4D03AQGYF_CTtQppAQ/profile-displayphoto-shrink_100_100/profile-displayphoto-shrink_100_100/0/1611036381405?e=1748476800&v=beta&t=JZSC9T4kSeQ2tLBJTNZbbc0drwPU5qwKOYE9SxjMKHQ”}

The json is saved in one cell as text type.

Id like to extract the Parameter memberid in the Backend from this String. What i usually do is to use Regex extract: where i get every Parametervalue of memberid.

I didn’t understand your way to call your own API and to get the Parameter. Would be nice, if you could show me a Video how you would do that.