Is Workload unit consumption completely arbitrary?

What is the main reason for the setup you have instead of using the native built in functionality that Bubble already provides for ensuring slugs are unique.

When you run the workflow action for set a things slug, the value you enter, Bubble checks against all records of the same data type, and if another record already exists, Bubble will append a numerical value to the new slug for the thing you are setting the slug for, in sequential order.

I would imagine that your setup is part of the issue as you are performing a search, which is not necessary.

If I have a data type called restaurant, and I set a slug to be the name of the restaurant, my setup is simply to use the set a thing slug and the value is the restaurants nameā€¦Bubble does all the heavy lifting for me there, so they will slugify the name and also check against all other restaurant entries and determine if a slug of the same value already exists, and if so, add a numerical value sequentially.

So, if I have McDonalds and there are 2 entries already with slugs

mcdonalds
mcdonalds-1

and then I add a new McDonalds, Bubble will make the new slug automatically to be

mcdonalds-2

I donā€™t know what they do behind the scenes for that or how it impacts WU consumption, but looking at your setup you are using a Search for the slug value and a formatted as text to evaluate. I would venture to guess the Search is what is the problem, and might not be the setting of a slug workflow action itself.

Also, if you are going to be appending the unique ID instead of a sequential number, and keep in mind the sequential number is handled by Bubble to ensure no duplicates and maintain slugs as unique identifiers, which was an added feature due to cries from the community for an easier approach to human readable URLs for SEO purposes, because unique IDs are not human readable and do not add any benefits for SEO and likely lower SEO ā€˜scoresā€™, I would suggest just not using slugs at all and just use the unique id itself as that is already a built in field that is automatically populated, since the approach of using a slug with appended unique ID does not get you the SEO benefits the slug feature is intended for. Additionally, remember, every character returned (so each number or letter of a datafield) costs WUs, so when you are taking the unique ID (that already exists and is built in, so we can not control that and will always be returned via a search and cost us WUs), and appending that to the slug, you are doubling the WU consumption for returning data values via a search, and from the way I see it, for no added value, since, again, I believe the slug is for SEO only and not just for unique identification of entries (it is unique, but we already had unique IDs).

In my apps, I do not use slugs on data types that will not be used for SEO purposes, and any data type that will not have a ā€˜unique pageā€™ where that page is part of an SEO strategy, I just use the unique ID.

Have you tested setting the thing slug without using the Do a Search approach and just simply setting the value to the proposed value and let Bubble append a sequential number? Iā€™d be interested to know if you experience the same WU consumption.

If I wasnā€™t clear the ~11 WU WAS for using the built in slug feature letting Bubble doing all the work.

The three approaches I used all come in st under 3WU! which is why i wrote them so ppl can have easy workarounds to save on WUs. They arent exactly hard for anyone who has any Bubble skillz and for me were well worth it to save millions of WU a month. I tested optimizng the slug in the.method bubble does it natively and was able to get WU to ~20% less than what bubble was using to do it but its a lot more complicated of a query and the WU is still way too high. Its a shame it needs to be done at all but I wasnt gonna wait around for Bubble to fix it.

and like i said it &only takes one simple conditional* and in apps where slugs are used on crawled pages i just do the same conditional with a sort that adds leading zeros and still save over 70% on WU when there are thousands of dupes.

3 Likes

okay, so the above was less intensive on the WU consumption compared to just allowing bubble to do it natively? That is WILD and a REAL CONCERN as it would indicate some serious flaws in Bubble code base

1 Like

Yes it reduces WU by 70% using that workaround ONLY when there are hundreds of duplicate slugs for a certain value (otherwise Bubbleā€™s native slug function is slightly more efficient).

The reason being that without leading 0s you canā€™t just sort and take highest value and +1. Which is why i solved it (in one scenario) just by adding leading 0s

Hi all,

Iā€™m Laura, the PM focused on monetization ā€“ as part of that Iā€™m also the PM who owns things like WU charts, alerts for WU consumption and more.

  1. Specific answer to the original question: I donā€™t know! But please do get in touch with our team. I assure you that we do look at these and anything thatā€™s a bug heads to my virtual desk to fix. Overcharging people for WU isnā€™t good for us (because it would create scenarios where people donā€™t trust us - as I can read above) or for you (because no customer wants that). I definitely want to see whatā€™s going on if our success team IDs that something isnā€™t working as expected.

  2. Alerting for WU. The alert does not consistently go out on that - this is sporadic and unfortunately ongoing. Every time someone writes in about this we try to investigate why it isnā€™t working as designed ā€“ a few weeks ago we made some changes that we thought addressed the issue. It sounds like itā€™s still ongoing and thatā€™s not good. Again, our team would be happy to to investigate but we need all the info to do that (I recognize that itā€™s a pain to submit sometimes but the reason we ask you to do that is because formally submitting something ensures that all the relevant data - app name, date of spike, when the notification went out, the specific workflow in your app - is there.

  3. Better alerts/tools for handling spikes. We arenā€™t good enough here, yet. This work is slated and weā€™re tackling it from a few different vectors. More here soon.

  4. Our support team: Last week, all of the Bubble team met in NYC as a team (we do this twice per year). This time is so important and in fact I spent some of my time working with folks on our team to discuss this exact topic (WU alerting and what they see). This does also mean that people eventually need to travel home if they arenā€™t NYC based, which is why there may be delay in response, as plane WIFI isnā€™t always reliable.

  5. In general - as the PM in charge of monetization, the last thing I want to do is create incentives for customers to leave the platform. We need to build better controls here. We need to do better. Weā€™re working on it. I know that canā€™t come soon enough but please know that there is more we can and will be doing here and that my DMs are open if you want to share more.

-Laura

6 Likes

Is it triggering the notification flow in the first place thatā€™s not happening right now (so if you added a webhook, that would be triggered late just like the emails currently)? If the delay is in what happens after Bubble begins processing the notification (sending emails and doing whatever else it does), the webhook is the fix we all want.

2 Likes

@laura.oppenheimer, thanks for replying. much appreciated.

Some follow ups:

  1. Given the multiple bugs with WU calculations that Bubble is aware of and, more importantly the alerts, how can anyone be charged for overages?
    Bubble knows the alerts arenā€™t going out properly ā†’ overages canā€™t be charged.
    Bubble doesnā€™t really know what the WU should be for a an action :exploding_head: (as we have collected dozens of support emails stating that more or less) and refuses to provide any hard and fast rules about what costs what ā†’ overages canā€™t be charged.

Overages canā€™t be charged 1) from a customer service standpoint (its Bubbleā€™s fault, not the customerā€™s and certainly not the developer who is being penalized for Bubbleā€™s issue) and 2) from an ethical perspective (Bubble created an inherent conflict where Bubble makes more money (a lot more) the worse the WU alerts and the more bugs there are) and 3) from a legal perspective.

How does Bubble not see that!?!

And this mislabeled waiver (spoiler alert: Itā€™s NOT a waiver) is far short of the minimum Bubble must do (especially from a legal perspective)

  1. In terms of the actual 11 WU per setting a slug, after much time, I fixed it as I wrote above, and itā€™s not a bug persay with regards to WU. Due to the lack of any explanation of the WU chart and what the actual line items mean or what actions use how much of what I assumed it was a WU bug but in fact isnā€™t. Just a fundamentally flawed way how bubble sets the slug that can cause huge WU costs in certain situations.

  2. I still havenā€™t heard any meaningful response to the March 22nd buy that I messaged you about.

  3. Itā€™s hard to reconcile that Bubble cares about the WU bugs or any bugs for that matter with how annoying it is to file a bug report and the delays in response and the lack of any clear answers / solution.

6 Likes

Are you aware of the built-in slug conditionals to check for duplicates?

I wonder if they would have a performance or WU advantage. :thinking:

1 Like

I say this in the nicest possible way, why the heck isnā€™t Bubble testing things before putting them into production?

What kind of product risks charging customers thousands of dollars and using live users as guinea pigs and somehow thinks that this is entirely acceptable? It really isnā€™t.

Users should not be the testing ground for all of these issues. The fact that Bubble seems to think that it is acceptable that they are and that these issues havenā€™t been fixed in over a year just shows that it isnā€™t a priority for Bubble.

The fact that Bubble does not test these things themselves makes me think that nobody on the Bubble team actually has created something with Bubble where they can test their own WU system to any degree.

You seem to be fully aware of these things but they arenā€™t fixed. Itā€™s been a year, I donā€™t think it is unreasonable to ask why not and why isnā€™t this a priority?

4 Likes

Good point. To me its basically half a dozen of one or 6 of the other. I was generally using conditonal ifs as i was using leading zeros but your point is appreciated.

Ill test WU (unfort too difficult to test performance) and report back

It really really isnā€™t (sorry one really just didnt cut it for me) and is 100% not legal.

This short sighted money grab, (distinct from other money grabs that are legal just not right) is going to blow up in Bubbleā€™s face very soon if they donā€™t voluntarily put a stop to it.

1 Like

@sudsy did some basic testing. As I assumed, the WU consumption is the same using either approach (slug can have vs conditional [if count of things that have slug value is 0]).

At first it seemed that the conditional method was much quicker performance wise for non-unique slugs (see table) but as I retested setting a slug that wasnā€™t unique the time came down significantly for both methods. I donā€™t know if it was because of better indexing as the original slug was set longer in the past or what not ā€¦

bottom line: both methods have the same WU consumption. Performance wise, the conditional method MAY be faster but thatā€™s inconclusive.

EDIT: Table
image

1 Like

Have you heard anything back from Support re: the cost of setting slugs?

Iā€™m running a simple test. I have a workflow that deliberately sets duplicate slugs.

I started here where the appended number is about 20:

image

WU is 4.43

When appended number is 60:

image

WU is 5.68

When appended number is 100:

image

WU is 6.30

Trending up?

Then I got tired of clicking and made a backend workflow to start cranking that number up to 1,000ā€¦

image

At about 260:

image

WU is 6.95

image

Holy man itā€™s so slow to iterate on listsā€¦

At about #400 ā€¦

image

WU is 7.51

My boredom level of watching a number slowly increment is reaching maximum AU (attention units)ā€¦

And about about 500:

image

WU is 7.58

Attention Units depleted.

I see a linear-ish relationship between setting a duplicate slug, Bubble calculating the appended number, and WUs consumed.

Someone mathy can probably calculate it based on my numbers there.

Okay one final bonus data point:

image

image

At about duplicate 650, the WU cost is 8.13

Note:

The WU cost and duplicate number (appended number to slug) is approximate. Iā€™m checking the logs when the duplicate number hits a milestone, so itā€™s not going to be exact.

1 Like

Iā€™m just curious why duplicates cost such a large amountā€¦.are they looping through slug-1, slug-2,slug-3,slug-4, etc until they find one that can be set? If so why and who thought that was a good idea scale wise :sweat_smile:

Iā€™d imagine simply searching for slug and use regex or another method to find the count of the host slug (slug-1) (only the bold part) then adding +1 would only require a single search cost.

But also that doesnā€™t even make sense because the above poster is saying 650 dupe records is 8.13 WU to set. Yet 650*0.015 for record pulls is 9.75 WU for the pulls aloneā€¦which is more than itā€™s actually costingā€¦

The bigger question here is why do we have to have a PHD to calculate some proprietary pricing model that no other company or platform uses and bubble themselves keep finding bugs in over a year later.

5 Likes

Chris, as stated above #19, due to the way duplicate slugs are set up (flawed in my opinion) itā€™s not a simple regex or sort due to lack of leading zeros. Instead a bunch of searches need to be done IF the root slug isnā€™t unique (e.g., does root-100000 exist? etc).

I was able to optimize it to be ~20% WUC les than Bubbleā€™s native slug but that reduction isnā€™t sufficient which is why I went with the approaches I offered above.

@julian5 Nope I didnā€™t hear back nor do I expect to both because of the way which Bubble handles support tickets (saying our feedback is important but acting as if it isnā€™t) AND because Iā€™m quite sure I have a better understanding of WUC with regards to slugs than anyone at Bubble given the responses theyā€™ve provided in this threat and others regarding the usage of WU.

Julian, the quickest and sure way to avoid randomly getting a 1M WU spike like I did is to use one of the methods above or any other that essentially determinesa the value of the slug before telling Bubble what to set it to.

1 Like

Thanks @code-escapee . The bummer for me is that I wanted to leverage the slug duplicator logic (bubble enforcing uniqueness and appending an integer) for something else (generating unique sequence integers).

But since the WU cost is both baseline high and grows over time, I canā€™t.

Yeah I did exactly that for a bunch of apps when i updated everything last week. the way to do that is to just add leading zeros and sorting by slug and then incrementing by one.

Tldr: IF slug root is unique set slug to root-001; ELSE set slug to find slug root- sorted by slug desc:first item split by:- formatas number add 1.

That isnā€™t guaranteed to be unique because of race conditions.

Two workflows could find the same reference slug and try setting it to the same next increment:

  1. Two workflows start about the same time - Workflow A and Workflow B.
  2. Both workflows find SLUG-001.
  3. Workflow A finishes and sets the slug to SLUG-002.
  4. Workflow B finishes and tries to set the slug to SLUG-002. Bubble sees the duplicate and sets the slug to SLUG-002-1.

You wind up with a mess like this:

image

@vladimir.pak ended up using an external solution with AWS to deal with this problem.

Maybe I misunderstood your solution?

Iā€™m not a WU expert by any means. However, to anyone reading this message, I recommend trying to optimize wherever possible but if WU is something that may decrease the profitability of your app significantly (the margins are small) then I recommend looking elsewhere than bubble. The reason is, as you can see here, itā€™s not very clear what a WU really costs in all scenarios - youā€™re essentially trusting bubble to act honestly. Youā€™re also opening up yourself to an enormous headache.

Thatā€™s just my two cents!

10 Likes

Yes there can be race condition issues but if you can spread out the slug setting (usually itā€™s not super time sensitive) then you shouldnā€™t have any issues. Also if you use a different character than dash before the increment number (and donā€™t use ā€œ-ā€ in the root slug itself) than you can easily find any race condition issues (e.g., DB trigger when a thingā€™s slug contains ā€œ-ā€) and reset those slugs

1 Like