I created a whatsapp like app for the company i work for, its has around 500 users, I am currently burning 100K unit a day around 60 to 80% comes from groups chats, is there anyone who can help in reducing this?
- Whatâs your DAU (Daily Active Users)?
- On an average, How many messages are created in a day?
So the largest WU burner in your charts point to that specific workflow? Or is it something else?
Using a plugin like Data Jedi or similar in conjunction with a Hybrid Data Structure can save 95-99% on WUs for both fetch and creation/modification of data.
For chat itâs likely just gonna save WUs on the fetch, but even then the fetch for chat is not the significant WU consumer, itâs the creation of messages, which you create and spend 1.12 WU of data per message.
Bubble apps should not be built to replace existing communication apps because WUs have pigeon holes bubble apps to specific types and have made certain features an absolute no go for the appâŚchat is a no go for bubble apps.
I donât know anything about your app, but that seems a crazy amount of WU for 500 users , but I guess it depends on how much messaging they are doing. ![]()
For context, my app has just under 10k users now, and we have a built an in platform chat system. Our daily average WU spend right now is 6000 wu per day, and the amount spent on the chat system is roughly 27 WU/day, or about 0.4% of our total daily amount.
I recommend you give buildprint a look, tell it about your chat system and ask it to look into why itâs costing so much. There may be a major issue that can be fixed and if there is, it will find it.
Good luck ![]()
![]()
Not sure if here is something you can do or not. But at this point, even small adjustments could make a major impact. Would love to look at the app to see where the issue is. Not sure if you are guessing or maybe you donât know how to follow the workload charts?
Yes the largest is search> inside search is the largest( please donât mind it showing deleted search, It is because I changed it and put some condintion on it (it is now showing âSearch for Group Messages:ItemâŚâ
Since deployment Feb 24th, we are averaging 143 users will send a messages a day, with 726 average messages a days
Donât use group byâŚit adds an additional 0.3 WU and is unnecessary for your use case.
A simple search of messages with constraint for the user or team or conversation is all you need.
Whatâs this screenshot from your post showing? Seems it was group by searches not regular search
Maybe that particular drill down of your searches was not meant to highlight the search used for the chat as I can see your search seems to be a regular search.
How many searches from the below screenshot that are deleted were your previous iterations of search for messages, and also team searches related to your chat system?
if setup right, each message sent costs 1.12 WUs, each search is based on of 0.3 WUsâŚwith those numbers expect minimum of 143 searches multiplied by 0.3 and 726 messages created multiplied by 1.12, plus the real time search since users may have the chat window open which is 0.1 I think every so often as long as chat window is open.
Iâm not sure if youâre also searching for values inside the RG of messages which may add more but you really shouldnât be consuming much more than 1,000 WUs per day based on those numbers youâve seen as daily average usage.
Hi Boston apologies for the previous screenshot it was highlighting the wrong search data
here is the latest data
Screenshot 1:
This is for today atleast it is lower due to a sunday and we have less trafficDonât mind the 13:00 spike at 13:00 I was exporting 18000+ records from the database
Screenshot 2:
14 816 WU are from search with 17 460 searches
Screenshot 3:
By order of usage
- the search on the repeating group I showed earleir (basic will show messages for a specific team
- Search for Commss - on the right hand side there is a banner (see screenshot 4) which will show commnunication (just like noticeboard), I wish I can make this one not always refresh as we only get 1, 2 or even 0 comms a day)
- Input read? value is not empty a⌠- This will indicate if there is a new message in the group which you havenât seen by showing a green dot (see screeshot 4)
- Search for Users:last itemâs profile - this fetchs the users profile picture from the user database and display it next to the message
Screenshot 3:
Here is the test verson
Yes team searches are related to the chat, this search will give you results of all the teams you are part of as show on the left hand side on screenshot 4
The screen shot from the search drill down is most helpful. You can see the main search of Group Messages is getting hit 2,570 times in the day. This is either user behavior of opening and closing multiple times (I say this because your number of users using the system is far less than that number of searches; 143 users sending messages compared to 2,570 searches) or it could be related to the conversation remaining open, a new message created and perhaps a bubble function of fetching again (Iâm not sure, that would need to be tested to assess).
Your search for Commss eats a lot too, and would be interesting to compare how many times it is searched.
One thing you would want to do, is likely refactor the database structure. The Commss (Iâll call them conversations) should have their own data type of conversation, with a field for the users that are part of the conversation, so a list of users. The messages should have itâs own data type with a field for conversation, related to the conversation and a field for âsenderâ and âreceipientâ which are both users, and since you are showing the profile image, which I assume is on the users profile, you are getting lots of extra searches or at the least extra âindividual data requestsâ to show that profil image in each message cellâŚyou can likely eliminate that by adding to message data type a field that is the users image url (only if you do not care if the image changes and past messages may have no image)âŚeither way, find a way to reduce the amount of times the system needs to traverse from the message to the user to the user profile to find the image as it is costing you WUs as far as I can see.
For scroll to entry in RG, likely remove the search and instead use a reference that already exists on the page as it seems it is associated with scrolling to most recent message.
For input read, change that to a database structure on the message to have a field called âreadâ as a yes/noâŚbut it seems from setup your dot is on the conversation to indicate unread messages, so either way, that little feature is going to cost WUs in either a search or data manipulation, the search being the cheaper of the two options, so you may just be stuck with it.
There seems to be multiple other searches for messges and teamsâŚfind a way to reduce them down to all that is needed, likely just one search for messages and one search for conversations, as the information of sender and receiver should suffice to provide the necessary information about teamsâŚin this messaging system the team details are just likely a name, an image and maybe a link to the profile, you can just store them onto the message or conversation data type, but of course that could cause an issue if they make changes to the details, so at the very least make the related field for the team of sender as well as the user profile of sender on each message and on conversations as well so you do not perform a search and instead have an individual data request.
No matter what the legacy approach to a chat system like this will cost you for creating a message, searching the messages and the conversations. More WUs than they should, just based on how Bubble currently charges.
Hi Boston Thank you this is very insightful and I will be applying some of you recommendations in the course of this week and see how it goes
The making a datatype conversation sounds like a great Idea and I will start with that one because with DMs or dual messages I set it up similar to that and Iâm not getting a spike in usage even though I average half the volume of group chats
With team searches I will change from database and make a team list on option sets, we have about 68 teams and changes rarely happen ,maybe twice a month,I can just update it on the editor when that happens
Profile picture will have link on the message as you sugggestion, users rarely change profiles pics and at this point it this feature which is not worth the wu
Thanks alot I really appriciate you help












