Author Topic: Exiting a using transation  (Read 4787 times)

0 Members and 1 Guest are viewing this topic.

sinc

  • Guest
Re: Exiting a using transation
« Reply #15 on: September 29, 2009, 09:20:09 PM »
Well, then you get into this, that Bryco posted:

Quote
Ellapsed time 1= 162.5024
Ellapsed time 2=953.1392
Ellapsed time 3=953.1392

In his code, (1) commits the transaction.  Meanwhile,  assuming you follow his directions and pick a line (or anything except a polyline) in the drawing, (2) and (3) are equivalent, and abort the transactions.  (2) and (3) take more than 5 times as long as (1).

But of course, if you are not creating a lot of transactions, you may not really care much about the difference in time between Abort and Commit.  However, for some purposes, the difference might be significant.  For example, if you write a command that might be called a lot by a script, then you may want to choose the one that runs fastest.  So this all seems to indicate that you may want to do like Kean recommends, and use Commit, unless you really want to Abort and roll back any changes.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Exiting a using transation
« Reply #16 on: September 29, 2009, 10:14:30 PM »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.