info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Timestamp race avoidance in do_update()


From: Laine Stump
Subject: Re: Timestamp race avoidance in do_update()
Date: 14 Feb 2001 13:16:02 -0500
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

BTW - on the subject of this sleep, I've found that it *greatly*
improves the amount of time it takes a rather long script to run if I
remove the sleep in the client. I know that's dangerous and stupid in
the general case, but in my specific case it doesn't cause any harm.

What I'm wondering is if we could change the "sleep(1); to be a
usleep(200) in a while loop instead. This should trim 1/2 a second
from each invocation of commit, on average, which can be quite a lot
when you're talking about several thousand files with dozens of
revisions for each...


address@hidden (Larry Jones) writes:

> Brad Chisholm writes:
> > 
> > Just to make sure I understand, CVS is sleeping to ensure that any post-CVS
> > process which might modify the file must also change the timestamp.  This
> > is necessary, because the CVS client relies on the timestamp to determine
> > whether a file has been modified.  (i.e. if the current timestamp of the
> > file matches the timestamp stored in the Entries file, then the client
> > will consider the file unchanged, even if the contents have actually 
> > changed).
> 
> Exactly.  As I said in the thread you quoted, you should send all of the
> file information first and then a single update command, not a separate
> update command for each file.  Also, the current development version no
> longer sleeps when in server mode; it is up to the client to do it
> instead.
> 
> -Larry Jones
> 
> Monopoly is more fun when you make your own Chance cards. -- Calvin
> 
> _______________________________________________
> Info-cvs mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/info-cvs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]