• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Speed?
#1
Hi all,

I'm post here having posted the same in the LiveCode forum as well - but this is a better place to do this.
I was wondering about the speed of LiveCloud operations.

I'm based in London and using the London servers. i'm connecting via a very fast WiFi connection (no proxies).
First cdb_ping(*table): 504.756927 ms
Average ping: 139.960051 ms

First cdb_pingNode(*table): 8.497 ms
Average PingNode 6.455 ms


The pingNode seems very respectable, not sure if ping is in the expected range.

I've timed some actions with LiveCloud, by storing 2 different tables in the cloud (21 records each, so quite a small number).
For each of these, there is first a check if a record exists (the premise that data in one or the other table may already exist in the database).

On average it takes about 2.5 seconds per table to store the data in the cloud (average 2476.5 ms). 

Possibly this is due to my algorithm: All data is stored already in a multidimensional array in LiveCode. I build a tInputA array of records to upload with a 'for each' loop

Pseudocode for each table:
Code:
local x, tInputA, tOutputA, tKey, tTableID

put cdb_TableID("tableName") into tTableID
Repeat for each element tArray in pArray
  add 1 to x
  put tArray[key1][key2] into tKey
  put cdb_query("keyName","=",tKey,"tableName","cloud","recordList") into tOutputA
  if tOutputA is empty then //this record does not already exist in the table
    put tArray[key1][key2] into tInputA[tTableID][x]["keyName1"]
    ...
    put tArray[keyX][keyZ] into  tInputA[tTableID][x]["keyNameX"]
  end if
end repeat
put cdb_batchCreate(tInputA,"cloud") into tOutputA

Keeping in mind that the full data may be >1000 records per table at a time and will involve at least 3 tables, this i suspect may be quite slow -- but not yet tested on large numbers.

Is this expected performance? 
I suspect my code is the culprit, any advice on speeding this up?
  Reply


Messages In This Thread
Speed? - by stamatis - 08-31-2020, 06:04 PM
RE: Speed? - by mark_talluto - 09-01-2020, 12:59 AM
RE: Speed? - by stamatis - 09-20-2020, 02:25 AM
RE: Speed? - by mark_talluto - 09-21-2020, 03:40 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)