Hi, I used javascript component in Xojo. When I have 7.000 items then reading from the Database and fill items class and calculating things takes cca 45 sek., but generating string items for js component takes more than 3 minutes. Is any way, how can I make it faster? During for cycle I see in task manager that RAM for Chrome(with my app) jump so fast from 50MB to 80MB and back to 50MB and again and again so fast. Can that this: Jscript = Jscript + “…” slow do?
This for cycle with 7000 repetition takes more than 3 minutes:
dim Jscript as string
dim items() as myItems
...
for i = 0 to 7000
Jscript = Jscript +"{ content: """ + items(i).KompArtikelNr +""", indentation: "+ items(i).level+", start: new Date("+str(dateend.year)+", "+str(dateend.month-1)+", "+str(dateend.day)+", "+str(dateend.hour)+", "+str(dateend.minute)+", 0), finish: new Date("+str(datestart.year)+", "+str(datestart.month-1)+", "+str(datestart.day)+", "+str(datestart.hour)+", "+str(datestart.minute)+", 0), id: """+str(i)+""", "
Jscript = Jscript +"assignmentsContent: """+ items(i).KompArtikelNr +""", artnr: """+ items(i).ArtikelNr+""", pos: """+ items(i).posnr+""", nazev: """+ items(i).bezeichnung1 +""", nazev2: """+ items(i).bezeichnung2 +""", kompart: """+ items(i).KompArtikelNr +""", pdv: """+ str(items(i).dlz) +""", pdvsk: """+ str(items(i).dlzbg) +""", ep: """+items(i).ep+""", hl: """+items(i).hl+""", mpp: """+items(i).mpp+""", bp: """+items(i).bp+""", ohnebe: """+items(i).ohnebe+""", vlz: """+items(i).vlz+""", fixa: """+items(i).isFixiert+"""}," + EndOfLine
next
...
me.ExecuteJavaScript(Jscript)