Performance question: multiple collections using tabs

Hi there,

I am creating a page using tabs. Each tab has table/datagrid to render different Xano data collections.

How does weweb cope with this? Will it fetch all the collections at once on page load or can I make it that only the collection for the current tab is fetched?

Thanks.

You can do both with workflows

Hi @FJP84 :wave:

By default, all the collections used on a page are loaded on page load but you can disable that behavior for a specific collection (which is probably what you would want to do for your tabs use case):

As @Broberto mentioned, you can then use a workflow to get the data you need when you need it with the “Fetch collection” action.

In the example below, we fetch a different collection depending on the value in our selectedTab variable:

3 Likes

Hi @Joyce additional question.

I sis8use the network inspector yet, but lets say I have the following Xano collections

A) GET /Projects
B) GET /Projects/{id}

Then I have two pages

Projects overview
This contains a list of projects using collection A.

Project details
This contains a form using collection B.

I my assumption correct that on Projects Overview only collection A is loaded. And on Project details only collection B is loaded?

Hi @FJP84 :wave:

If you have “Fetch this collection automatically” on both collections A and B, then yes :slight_smile: