[rescue] slow java code...an example of why it might be happening

Dave McGuire mcguire at neurotica.com
Tue Feb 11 16:36:13 CST 2003


On Tuesday, February 11, 2003, at 04:48 PM, Patrick Giagnocavo 
+1.717.201.3366 wrote:
> I delivered a custom bit of software to a customer that had the same
> flaw you are describing.
>
> I could have speeded it up mightily by taking the data to be converted
> and re-arranging it, then using the high-speed copy utility to dump
> the data into the db.  Instead, my code painstaking wrapped each
> insert inside an SQL transaction.
>
> This was a deliberate decision, since the error checking you get from a
> bunch of constraints is very nice, and since the program in question
> was a batch one, it didn't matter if a typical run took 15 minutes
> instead of 15 seconds.
>
> There were other ways the code could have been speeded up, but
> prototype speed was fast enough.

   That sounds perfectly reasonable, given the circumstances.  The 
situation I described, however, was pure SELECTs and part of an 
interactive program.

       -Dave

--
Dave McGuire             "I've grown hair again, just
St. Petersburg, FL           for the occasion."       -Doc Shipley


More information about the rescue mailing list