PricingDocsAcademy
Bluesky ...
Wed, Dec 11, 10:31 PM

My app is laggy when I'm logged in

  • Armand

    3 months ago

    My app uses Supabase for auth and database. And the moment I log into it on the frontend it just becomes laggy, particularly on the input fields.
    When not logged in, it behaves normally.

    I am not loading a lot of data, 1 row from Table A and about 50ish rows from Table B, no images in either table's column and less than 50kb in total. As far as I can tell from the Network tab in the inspector, there are no unnecessary calls to the API. I only see them pop-up when they should, so I don't think I inadvertently created some call API loop.

    The above behavior (laggy when logged in, normal when not logged in) is the same across different devices and browsers:
    1. MacOS (Safari/Firefox)
    2. iOS (Safari)

    The fact that it occurs when logged in indicates that it has something to do with Supabase or how I've its API set up, but I can't find it.

    Does anyone have any idea of where I should look to find the cause?
    βœ…1
  • Armand

    1 month ago

    Moving all different parts into components solved this.

    It was not the group of elements that I thought caused this, but rather another group which is fed 1 object of data through an API call.
    Annoyingly I am not sure why this was what caused the laggy app (but glad I found a solution). I'm assuming it is somehow related to how components compartment a group of elements and their logic/data/etc.

    Just updating here in case someone stumbles upon this and is looking for a potential solution for a laggy app: Components.
    πŸ’ͺ1
  • Max

    1 month ago

    Glad you solved it πŸ’ͺ🏼
    πŸ‘1
  • It is always a good idea to have a solid component structure

Stop scrolling. Start building.

toddle is a visual web app builder that rivals custom code β€” but accessible to your entire team!

Try toddle β€” it's free!

Β© Copyright 2024 toddle. All rights reserved.