Retool App Extremely Slow and Freezes A lot

Hello,
I manage F&B using admin panel built on retool. Each restaurant has access to their restaurant only from which they have CRUD operations in menus, order tracking, restaurant's main info and more.

For more than 3 weeks, restaurant admins using retool complained a lot about the long loading times, as well as the casual freezing of the app (when freezing occurs, the app does not show a specific restaurant, the temporary solution is that the admins must refresh the whole website, and does not always work). I noticed the issue occurs to the restaurant admins who have access to a certain restaurant. For example, my account has access to all restaurants and did not face the issue, until I had access to a specific restaurant.

The F&B admin panel was operating fine and suddenly all of this happened. I would love your support regarding solving this issue as well as better ways to enhance the apps and access permissions to different restaurant admins if possible.

Thankyou.

Hey @OmarElBana, hard to say what's going on without some more information here. Can you share a bit more about what actions are taken in the app before the freezing occurs? Is this happening on app load, after certain queries are run etc.

I noticed the issue occurs to the restaurant admins who have access to a certain restaurant.
Can you explain what having access to a certain restaurant means?

If only users who 'have access' to this restaurant are affected, then I'd dig into the data returned for that restaurant in particular. Is it larger than the data for the others?

Hey @joeBumbaca, thankyou for replying. The freezing occurs randomly in the app and it started happening suddenly. It doesn't happen after a certain query/action runs on the app.
Regarding the access to a certain restaurant. We have admins operating on a specific restaurant, each restaurant is added to the group "Restaurant managers" and the restaurant_id is added to the user attributes (As shown in the screenshot). these admins face the freezing issues and lag with retool whereas an admin like me who has access to all restaurants do not face these issues. In addition to this issue, if I change the restaurant_id of an admin, and logged in with the admins credential to retool, I will see the old restaurant not the updated restaurant as changed in the restaurant_id
Thankyou.

Hey @OmarElBana Thanks for the explanation.

Can you share what that custom user attribute (restaurant_id) affects in the app? Assuming you are using it to fetch restaurant data in some fashion. Very interested in how the data returned is different for that particular restaurant_id vs the others as this is the only restaurant affected.

Sending over an app export and .har file would be great as well. To do so (instructions for chrome):

  1. Right-click in the browser window or tab and select Inspect.
  2. Click the Network tab in the panel that appears.
  3. Refresh the page and use the app until the freezing occurs.
  4. Click the download button Download ("Export HAR" appears when you hold the pointer over it).
  5. Name the file.
  6. Click Save.

Thanks!

Hi @joeBumbaca hope all is well. Sorry for any misunderstanding. We as admins (who have access to everything and don't lie under any other group and have the "is_restauarant_manager" set to false and "restaurant_id" empty) have no problem with any of the F&B apps. However, any user of the apps we've made is now in the "Restaurant Manager" group and has the attributes my colleague Omar has mentioned above. Where "is_restaurant_manager" is set to true and "restaurant_id" is the restaurant id he/she manages in our database. The freezing only occurs to users using the apps who are in the "RestaurantManager" group. Everything works perfectly and then suddenly the app freezes. So, we think it is the groups or permissions causing the freeze since we only encounter them when certain permissions or groups are assigned to the user.

If you could please assist us.
Thank you in advance.


Here is a picture of our app for illustration
.

@Sarah-Amr Assuming that there is some data being brought into the app based on the user attribute of restaurant_id, it would be good to see how that is used in the app.

Sending over an app export and .har file would be great as well. To do so (instructions for chrome):

  1. Right-click in the browser window or tab and select Inspect.
  2. Click the Network tab in the panel that appears.
  3. Refresh the page and use the app until the freezing occurs.
  4. Click the download button Download ("Export HAR" appears when you hold the pointer over it).
  5. Name the file.
  6. Click Save.

Hello @joeBumbaca issue in sending a file type .har here, can you send me your email to send it to you there instead. Just a quick note: that the restaurants use tablets with 4Gb RAM to run the F&B operations. Could this be the issue?