We understand that nk.storageRead supports multiple read requests simultaneously. However, if we split each request and invoke nk.storageRead separately, how significantly would performance be impacted? If there is a substantial performance difference, what factors contribute to it?β
for example
let userId = '4ec4f126-3f9d-11e7-84ef-b7c182b36521';
let objectIds: nkruntime.StorageReadRequest[] = [
{ collection: 'save', key: 'save1', userId: userId },
{ collection: 'save', key: 'save2', userId },
{ collection: 'save', key: 'save3', userId },
];
let results: nkruntime.StorageObject[] = [];
try {
results = nk.storageRead(objectIds);
} catch (error) {
compare with
let userId = '4ec4f126-3f9d-11e7-84ef-b7c182b36521';
let objectId1: nkruntime.StorageReadRequest[] = [
{ collection: 'save', key: 'save1', userId: userId },
];
let objectId2: nkruntime.StorageReadRequest[] = [
{ collection: 'save', key: 'save2', userId },
];
let objectId3: nkruntime.StorageReadRequest[] = [
{ collection: 'save', key: 'save3', userId },
];
let results1: nkruntime.StorageObject[] = [];
let results2: nkruntime.StorageObject[] = [];
let results3: nkruntime.StorageObject[] = [];
try {
results1 = nk.storageRead(objectIds1);
results2 = nk.storageRead(objectIds2);
results3 = nk.storageRead(objectIds3);
} catch (error) {