Hello fellow Torquers,
I like how Torque allows you to retrieve a list of Torque objects with a
single select. That's great! I'm looking for something similar for save()
I'm doing some profiling on my application and see that a lot of time is
being used in the part of code where I save about 1000 Torque objects back
to the database; they are all the same type. Right now the code is
essentially a for loop doing a save() on each object. I'm wondering if
there is a way to speed this up, by effectively passing an array of objects
to be saved in a single method and allowing the Torque engine to only do a
single prepare.
Instead of
for (int i=0;i<books.length;i++) {
Book book=(Book)books[i];
book.save();
}
The save method is taking up the vast majority of the time in this loop of
course.
Maybe something like BookPeer.save(books);
Is there any method like this or any easy way to accomplish what I'm looking
for?
Thanks much!