I have tried a lot of things to try to get my website to load faster, I need to get information on the repeater to load faster right now it is taking around 10 seconds, I would like this to be at most 5 seconds. The repeater contains no images, it is all text, it also is only loading 7 items currently. Any suggestions on how to get it to display information faster?
Hi, I don’t know how you structure your query but usually the slowest thing is the repeater binding.
Do you mind sharing you code?
If you know how to code, you can use custom web component:
see here how this load 500 items in a repeater like element: https://www.test.enhancement.studio/elem-repeater
For the record this code has been provided by Wix, I merely host it
more info : https://support.wix.com/en/article/corvid-about-custom-elements-8253009
Here is my code for the query, but I think I might look into the custom web component.
if (wantedFormated <= currentFormated) {
wixData.query(“Agenda”)
.le(“date”, wantedFormated)
.eq(“completed”, false )
.find()
.then( (results) => {
if (results.items.length > 0) {
let items = results.items;
$w(“#agendaRepeater”).data = items;
$w(“#agendaRepeater”).onItemReady( ($item, itemData, index) => {
$item(“#groupText”).text = items[index].group;
$item(“#studentLead”).text = items[index].leadStudent;
$item(“#mentor”).text = items[index].leadMentor;
$item(“#members”).text = items[index].teamMembers;
$item(“#task”).html = items[index].descriptionOfJob;
})
$w(“#agendaRepeater”).expand();
}
else {
console.log(“no items found”);
$w(“#agendaRepeater”).collapse();
}
} )
. catch ( (error) => {
let errorMsg = error.message;
let code = error.code;
} );
Thanks
@chewycool You should format your code when posting
I don’t see anything wrong with your code that could explain it slowness
but here is the “correct” way to bind data
$w("#agendaRepeater").onItemReady(($item, itemData, index) => {
$item("#groupText").text = itemData.group;
$item("#studentLead").text = itemData.leadStudent;
$item("#mentor").text = itemData.leadMentor;
$item("#members").text = itemData.teamMembers;
$item("#task").html = itemData.descriptionOfJob;
})
You can also increase the speed with this technic:
How did you create the repeater in the test website you listed? It loads super fast, how would i design something like this in wix with that kind of speed, i want to load ~500 elements