Optimizing load time discussion

During our last Master meeting we had a bit of talk about how to load items in fluidly and getting better load speeds. Like pagination of repeaters etc.

So in the spirit of considering testing a on view-port enter “load more” functionality for a repeater I thought
Even with the improvements of speed wix keep promising.
Lets actually have a discussion about clear optimizing methods we as “masters” have found seem to function. Speed or security etc.

I can start with a simnple one:
Calling lightboxes from Corvid using openlightbox seems to consistently be faster than using the call on a button. Also give the abillity to send variables along so win win.

A small trick that I use to improve loading time (I believe but did not measure) is to request data before the page is ready.

So instead of

$w.onReady(async function() => {
    const {items} = await                         
        wixData.query("collection").find();
});

I do

const dataPromise = wixData.query("collection").find();

$w.onReady(async function() => {
    const {items} = await dataPromise;
});

So the request for data is fired as soon as the script is loaded and does not need the wait the page to be ready to do the request.

On top of that, there are the usual tricks of caching data and to not repeat the requests that have already been made but this would require a longer post and is not specific to Wix

Cool idea. See this is what i wanted to see.
Thanks for sharing :smiley:

Thanks Quentin :ok_hand: