We are having a Google App Maker app using Google Cloud SQL tables. Our location is Prague, Central Europe and saving one record takes incredible 240ms at minimum.
It looks like Google App Maker has a proxy just close to my location (latency ~20ms). However our instance set up in US-Central1 (which is recommened by Google to provide Google App Maker apps with the best performance) shows ~120ms ping.
We have tried many things including changing the instance location to Frankfurt, Germany (~25 ms). In this case, it took even longer (500ms per record). Our queries seemed to be round-tripping this complicated way: Our location (proxy) → US (Google App Maker master) → Frankfurt (SQL instance)
We are quite desperate as we cannot afford to migrate away from Google App Maker at the moment. And I strongly believe this has some solution either now or in the future.
My resources: db-f1-micro (vCPUs: 1), Memory: 614.4 MB, Storage capacity: 10 GB Database version: MySQL 2nd Gen 5.7, Instance zone: us-central1-a Connectivity: Public IP, My location: Prague, Czech Republic
function serverSaveData() {
var recordData = [];
recordData[0] = ['NewField_String']
recordData[1] = ['NewField1_String'];
for (var i = 0 ; i < recordData.length; i ++) {
var newProduct = app.models.testDB.newRecord();
newProduct.NewField = recordData[i][0];
newProduct.NewField1 = recordData[i][1];
var time = new Date().toString();
app.saveRecords([newProduct]);
console.log('Product saved: ' + time);
}
}
We need the speed to be maximum ~25ms per record (one tenth of the actual speed). We have 10000 products and importing should not take more than several minutes.
Would you guys please see any solution, or is there a way to save records to the database in bulk? Thank you so much!