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…
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.
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.
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.
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.