Help

Apps loading slowly or not at all

Topic Labels: Custom Extensions
4273 4
cancel
Showing results for 
Search instead for 
Did you mean: 
Sticker_ninja
6 - Interface Innovator
6 - Interface Innovator

A lot of my custom apps have been hanging on their loading screens for several minutes. Am I simply loading too much data (about 55 fields) from too many records (about 11,500 in the table I’m selecting with getTableByName) ? Am I using the useRecords hook wrong? I made a test app with just the Hello World template and loaded in my records, so I’m fairly sure the issue isn’t anything else I wrote… Any suggestions would be very appreciated!
Here is the way I am loading data into the Hello World app:

import {
    initializeBlock,
    useBase,
    useRecords,
  } from "@airtable/blocks/ui";

import React from 'react';

function HelloWorldApp() {

    const base = useBase();
    const lineItems= base.getTableByNameIfExists("Items");
    
  
    const view1 = lineItems.getViewByName("View 1");
  
 
    const opts = {
      sorts: [
        { field: "On hold" },
        { field: "Locked" },
        { field: "Priority", direction: "desc" },
        { field: "Was on hold previously", direction: "desc" },
        { field: "Countdown start" },
        { field: "Order ID" },
      ],
      fields: [
        "Order ID",
        ....
        .... (about 50 other fields)
        ....
      ],
    };
  
    const view1Records = useRecords(view1, opts);


  const view2 = lineItems.getViewByName("View 2");


  const view2Records = useRecords(view2, opts);

  const view3 = lineItems.getViewByName("View 3");

  const view3Records = useRecords(view3, opts);


    return <div>Hello world 🚀</div>;
}

initializeBlock(() => <HelloWorldApp />);

4 Replies 4
Fred_Zhao
Airtable Employee
Airtable Employee

Hi again Sticker_ninja! Looks like this might be a continuation of this previous question: Improve app performance on large bases/load tables conditionally

A few things to check:

  1. How many apps do you have contained within the dashboard? If you have a lot of apps, that can also affect the loading time.
  2. Have you tried a pre-release version of the SDK? I’m curious if that improved things for you.

Hi again! Yes, it is. I do have a lot of apps on one dashboard, but for most of them, the records and most of the content do not load until the viewport is expanded. I have experimented with putting each of the slower apps on their own dashboard but that has not seemed to speed them up significantly. :frowning: I did try the experimental SDK you sent me a few months back. Thanks for that, by the way! I couldn’t tell if it improved things when I installed it back then, but I will try it again! Is the one you sent me still the best one to use?

Fred_Zhao
Airtable Employee
Airtable Employee

Ah, we had a data loading issue for apps that was addressed this past Monday night. Are the apps loading much faster for you now?

Yes, they are back to normal, thankfully! :grinning_face_with_big_eyes: Still looking forward to the potential future version of the SDK with performance improvements for large bases related to loading records! :winking_face: I did try installing the experimental SDK you sent me on one of apps, and it did improve the loading time slightly even with the data loading issue (as in, the app loaded eventually instead of never), which actually saved the day haha