RenderCycle question - Improving Repeater Loading Behavior

I have been trying to use render cycles to improve my page’s loading speed and the dynamics of the page.

When the page loads many times the repeater will first show the original wix repeater data which was included in original element i.e. Josie Lane.

For some reason though, when I try to get a repeater data to load during renderCycle 1, the repeater does not always load. What am I missing here?

The page is: https://www.ppa-mc.com/Webinars/Innovation-Unleashed/Navigating-Innovation-Today-to-Build-Value-Tomorrow

and the code is below. Many thanks in advance, Chris


 
import wixData from 'wix-data';
import { singleVariableQueryAscending } from 'backend/databaseQueries';
import wixWindow from 'wix-window';

const webinarHosts = "WebinarHosts"

$w.onReady(function () {

 // This is a dataset on a dynamic page the _id is used to find hosts for the particular webinar
 let data = $w("#eventData").getCurrentItem()

 // Run if renderCycle is 1 this does not always work
 if (wixWindow.rendering.renderCycle === 1) {
    loadHosts(data)
 }
 });

// function to fill the repeater with data and update elements
export function loadHosts (data) {
      // standard wixData.query which lives in the backend  
      singleVariableQueryAscending(webinarHosts, "webinarTitle", data._id, "priority")
        .then((result) => {
      
            // fill the "hosts" repeater with data
            $w("#hosts").data = result
            
            // Update the specific items in the repeater
            $w("#hosts").forEachItem(($item, itemData, index) => {
                $item("#host").text = itemData.firstName + " " + itemData.lastName
                $item("#company").text = itemData.company
                $item("#position").text = itemData.position
                $item("#hostImage").src = itemData.hostImage
            })
                
            // Expand when complete
            $w("#hosts").expand()
        })  
}

" Deprecation note: the renderCycle property no longer works as expected. It will always return 1. "
https://www.wix.com/corvid/reference/wix-window.rendering.html#renderCycle

Hmmm, well that is not good, but in either case since it is returning 1 the code should still work as it states “if === 1”.

So the real issue I’m facing is when a repeater is loading the page is acting super strange. See the picture below:


When page opens you can see that the repeater for some reason extends far beyond the footer for around 30 seconds or so. The pagination also floats around. After a period, the page snaps into place so that is why I was trying to find a way to ensure that the repeater or the page completely loads before expanding. Any thoughts on this?