Create New Record In Acumatica Or Which Insert Works Faster

Create new record in Acumatica or which insert works faster

Hello everybody,

today I want to share results of my investigations of two similar pieces of functionality in Acumatica.

Have you ever wondered which Insert in cache works faster this:

a) var temp = (PRPayrollDetails)PayRollsDetails.Cache.Insert();

or this:

b)          var temp = new PRPayrollDetails();

             temp = (PRPayrollDetails)PayRollsDetails.Cache.Insert(temp);

If to believe to results of Stopwatch, the second part of code works faster. For my set of data, the first one took 5.5 seconds, while the second option took 4.3 seconds. And this is difference for 300 records. If you have any ideas why it can be, you are welcome to share them.

And if I had 250 records then the difference between option a and b is ~4 seconds

No Comments

Add a Comment
Comments are closed