Is Workload unit consumption completely arbitrary?

Ok @boston85719 @chris.williamson1996 .

Did some heavy testing. Bubble seems to make it harder by the whole log situation (no exports, pagnation, WU filter, and I still have no idea what any of the filters actually mean).

Basically, the major WU spike is from there being thousands of records that have the same slug (as volume increases the WU hit is less but it’s not a computable slope).

I played with it a bit and was able to optimize it to be less WU than Bubble, but not by a whole lot (like ~20% when there that many duplicates).

Besides for no info on this anywhere in all the WU documentaion and the WU numbers being outrageous, to me, it’s about how flawed the whole Set a slug is. For starters, the fact that setting a slug it has to be a seperate WF action and there are no basic options (what to do when duplicate, e.g., don’t set it or append X) and also that duplicates use the moniker that is allowed elsewhere in the slug.

But to me, and I’m curious if I’m alone in this, the whole point of the slug is to be a unique identifier (preferably readable) to remove the headache of certain duplicates. So if I have a slug, e.g., ABC Company → abc-company and there are duplicates, I couldn’t care less how many duplicates there are or a sequence of when the slugs were set, just the fact that there are duplicates. Therefore if Bubble were to stop the sequential numbering and just indicate it’s a duplicate by appending the UID, all of these issues go away. (OR even if they were to use leading zeros before the count then 95% of the WU would go away).

So I used 3 different approaches to solve for this for a couple of dozen apps (based on how the slugs are being used within the app), but the easiest fix (which Bubble could make native with a 1/2 hour of work) is super simple:

   When setting a thing's slug:  slug value= do a search if this proposed value of the slug exists as a slug for the any thing of this data set: formatted as text: 
   for yes: slug value  = proposed slug value
  for no:   slug value = proposed slug value:append "-" append This thing's UID.

cuts down the WU by up to 90% (based on volume) and makes it very easy to know if an slug is unquie by searching if slug contains “-” or whatever indicator you choose to use.

Ill post more details on the weird curvature of the WU consumption based on volume and other ways bubble can fix this fundamentally flawed Slug setup and other fixes I used as well but just wanted to jot this down before the weekend).

2 Likes