I have created a POC for a client using the existing excel upload example provide in Canvas. The existing example only have 10 records. The client experience performance issue when loading data file that has 700 lines.
There are also more validation done on the POC compare to the example provided. Therefore in the attach code provided, “validate” function took the most time as each record is querying TM1 to get the validation outcome.
Can you please advise how i can improve on this ? Please let me know if you require any additional information.
To improve the validation speed instead of querying TM1 for each item you could pull all of the dimension info required and then validate it client side. Unless there are millions of elements in the dimensions it should be quicker.
An approach that might help out is to do the cellsetGet first and check which is read-only.
You should be able to pass the same set of array into both functions. Once it returned the result, check which ones are read-only, mark the row where it belongs and remove it from the array so that it will not error out.
That way, you can batch them all up in theoretically 2 calls - a cellsetGet and a cellsetPut for the editable cells.