Alaska Software Inc. - COMMIT
Username: Password:
AuthorTopic: COMMIT
Husain SalikCOMMIT
on Fri, 21 Jul 2006 20:44:09 +0530
Hi Friends,

I am just now moving onto XBASE++ from Clipper 5.0.

I have come across a problem with COMMIT command, this command is slowing
down my sw drastically.

pls help.

Regards,
Husain Salik
James Loughner Re: COMMIT
on Fri, 21 Jul 2006 12:20:00 -0400
Xbase++ does a commit on Unlock ie it is no longer needed to do this

COMMIT
UNLOCK

just do

UNLOCK

This may help some

Jim

Husain Salik wrote:
> Hi Friends,
> 
> I am just now moving onto XBASE++ from Clipper 5.0.
> 
> I have come across a problem with COMMIT command, this command is slowing
> down my sw drastically.
> 
> pls help.
> 
> Regards,
> Husain Salik
> 
>
Osvaldo RamirezRe: COMMIT
on Fri, 21 Jul 2006 06:29:49 -0600
Hello James

How do you know ?

> Xbase++ does a commit on Unlock ie it is no longer needed to do this
>
> COMMIT
> UNLOCK

Best Regards
Osvaldo Ramirez
Randy HoweRe: COMMIT
on Fri, 21 Jul 2006 18:16:29 -0700
James,
    From the STD.CH include file from clipper
       #command COMMIT                 => dbCommitAll()

the UNLOCK would have to have been done prior
to the COMMIT command or the COMMIT command
would produce an error.  COMMIT was a way of
flushing the buffers and forcing a write back to the
database file.  Isn't that right?
- Randy Howe


"James Loughner" <jwrl@charter.net> wrote in message 
news:3c46e31e$65de3c24$1a306@news.alaska-software.com...
> Xbase++ does a commit on Unlock ie it is no longer needed to do this
>
> COMMIT
> UNLOCK
>
> just do
>
> UNLOCK
>
> This may help some
>
> Jim
>
> Husain Salik wrote:
>> Hi Friends,
>>
>> I am just now moving onto XBASE++ from Clipper 5.0.
>>
>> I have come across a problem with COMMIT command, this command is slowing
>> down my sw drastically.
>>
>> pls help.
>>
>> Regards,
>> Husain Salik
>>
>>
James Loughner Re: COMMIT
on Fri, 21 Jul 2006 22:28:49 -0400
An Unlock does a Commit in Xbase++, unlike Clipper. So doing an Unlock
and commit is redundant and may cause two writes. How do I know Stephen
told me

Jim

Randy Howe wrote:
> James,
>     From the STD.CH include file from clipper
>        #command COMMIT                 => dbCommitAll()
> 
> the UNLOCK would have to have been done prior
> to the COMMIT command or the COMMIT command
> would produce an error.  COMMIT was a way of
> flushing the buffers and forcing a write back to the
> database file.  Isn't that right?
> - Randy Howe
> 
> 
> "James Loughner" <jwrl@charter.net> wrote in message 
> news:3c46e31e$65de3c24$1a306@news.alaska-software.com...
>> Xbase++ does a commit on Unlock ie it is no longer needed to do this
>>
>> COMMIT
>> UNLOCK
>>
>> just do
>>
>> UNLOCK
>>
>> This may help some
>>
>> Jim
>>
>> Husain Salik wrote:
>>> Hi Friends,
>>>
>>> I am just now moving onto XBASE++ from Clipper 5.0.
>>>
>>> I have come across a problem with COMMIT command, this command is slowing
>>> down my sw drastically.
>>>
>>> pls help.
>>>
>>> Regards,
>>> Husain Salik
>>>
>>>
> 
>
Phil Ide
Re: COMMIT
on Mon, 24 Jul 2006 09:56:44 +0100
James,

> An Unlock does a Commit in Xbase++, unlike Clipper. So doing an Unlock
> and commit is redundant and may cause two writes. How do I know Stephen
> told me

In Clipper v5.x, dbUnlock() caused an implicit commit.

COMMIT is a legacy command in network apps, but is very important when the
file is used exclusively as writes are cached, and the cache may not be
flushed when the file is closed, so updates can easily be lost.

Clipper S'87 required COMMIT, and many C'5.x apps are S'87 source
recompiled, so it is necessary to have the command both for exclusive use
and compatibility with Clipper.

Regards,

Phil Ide

-----------------------------------------------------------------
xbHCL (http://www.xbHCL.com)     Xbase++ HTML command layer
PBIH  (http://www.pbih.eu)       Polar Bear International Hosting
-----------------------------------------------------------------
Xbase++ FAQ, Libraries and Sources:
http://www.idep.org.uk/xbase

And don't dangle your participles in public.
Geoffrey Cohen Re: COMMIT
on Sun, 23 Jul 2006 10:15:24 +1000
"Husain Salik" <husainsalik@yahoo.com> wrote:

I have found that xbase DOES NOT do a commit after Unlock, I  use the
following Logic, and it does work.

When I put the Commit inside the loop, processing of a few hundred
records took 4 minutes, as shown below it was around 20 seconds  

DO WHILE ????

    Rlock()
    DO SOME STUFF
   UNLOCK

   SKIP
ENDDO

COMMIT


>Hi Friends,
>
>I am just now moving onto XBASE++ from Clipper 5.0.
>
>I have come across a problem with COMMIT command, this command is slowing
>down my sw drastically.
>
>pls help.
>
>Regards,
>Husain Salik
>
James Loughner Re: COMMIT
on Sat, 22 Jul 2006 23:39:33 -0400
Strange Stephen told us at the DEVCON that an unlock does perform a
commit. Or did I imagine that? :

Jim

Geoffrey Cohen wrote:
> "Husain Salik" <husainsalik@yahoo.com> wrote:
> 
> I have found that xbase DOES NOT do a commit after Unlock, I  use the
> following Logic, and it does work.
> 
> When I put the Commit inside the loop, processing of a few hundred
> records took 4 minutes, as shown below it was around 20 seconds  
> 
> DO WHILE ????
> 
>     Rlock()
>     DO SOME STUFF
>    UNLOCK
> 
>    SKIP
> ENDDO
> 
> COMMIT
> 
> 
>> Hi Friends,
>>
>> I am just now moving onto XBASE++ from Clipper 5.0.
>>
>> I have come across a problem with COMMIT command, this command is slowing
>> down my sw drastically.
>>
>> pls help.
>>
>> Regards,
>> Husain Salik
>>
>
Brian L. WolfsohnRe: COMMIT
on Sun, 23 Jul 2006 07:11:16 +0200
Geoffrey Cohen <geoff@rce.com.au> wrote in 
news:clf5c2tl2u940lce22jf8m2o67fn2ppm0q@4ax.com:

> When I put the Commit inside the loop, processing of a few hundred
> records took 4 minutes, as shown below it was around 20 seconds  
> 
> DO WHILE ????
> 
>     Rlock()
>     DO SOME STUFF
>    UNLOCK
> 
>    SKIP
> ENDDO
> 
> COMMIT

I received the same information, and I believe there are some past 
threads on this issue in the newsgroups.

if the commit is inside the loop, the function is doing extra work.. so i 
would expect it to be slower..  

I wrote a specific function my_unlock() to make it easier control unlock 
behavior depending on what comes up in the future, but we're happy with 
the results of eliminating the commits.  It's not empirical, but things 
seems more stable this way.

Brian
Geoffrey Cohen Re: COMMIT
on Fri, 28 Jul 2006 20:24:49 +1000
This is with 1.82, of course


>Geoffrey Cohen <geoff@rce.com.au> wrote in 
>news:clf5c2tl2u940lce22jf8m2o67fn2ppm0q@4ax.com:
>
>> When I put the Commit inside the loop, processing of a few hundred
>> records took 4 minutes, as shown below it was around 20 seconds  
>> 
>> DO WHILE ????
>> 
>>     Rlock()
>>     DO SOME STUFF
>>    UNLOCK
>> 
>>    SKIP
>> ENDDO
>> 
>> COMMIT
>
>I received the same information, and I believe there are some past 
>threads on this issue in the newsgroups.
>
>if the commit is inside the loop, the function is doing extra work.. so i 
>would expect it to be slower..  
>
>I wrote a specific function my_unlock() to make it easier control unlock 
>behavior depending on what comes up in the future, but we're happy with 
>the results of eliminating the commits.  It's not empirical, but things 
>seems more stable this way.
>
>Brian
>
>