I having problems retrieving a large amount of data and displaying it on screen using Corvid.

I’ve been asked to inject 91000+ keywords into a page, around 2MB of text data. Rather than slow the page down I opted to use jQuery and Ajax as a test on just a plain Html hosted page and had a working solution in about 5 minutes (maybe 10).

On Wix, its been over a month of trying and it still won’t work. I’m either coming up against stack limitations or nothing happens or more often than not Wix crashes my browser. I know the code runs because I can see my console.log() messages (any browser).

See my code below. This isn’t something I would do myself but I have been asked to help someone out who is using Wix, which supports neither jQuery nor Ajax.

Any help woud be much appreciated

export function button1_click(event) {
if( $w(“#columnStrip2”).collapsed ) {
$w(“#columnStrip2”).expand();
}
else {
$w(“#columnStrip2”).collapse();
}
}

function getData(start) {
let query = wixData.query(“Keywords”);
return query.limit(1000).skip(start).find().then(results => {
return results.items;
});
}

$w.onReady(function () {
//TODO: write your page related code here…
let flag = false;
for(let i=0;i < 91289; i+=1000) {
console.log(i);
getData(i).then((items) => {
items.forEach((item) => {
if (flag == false){
$w(“#text1”).text += item.keyword;
flag = true;
}
else
{
$w(“#text4”).text += item.keyword;
flag = false;
}
});
});
}
});