gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] [PATCH] Speed up gpsfake.


From: Gary E. Miller
Subject: Re: [gpsd-dev] [PATCH] Speed up gpsfake.
Date: Thu, 17 May 2012 11:18:41 -0700

Yo Beat!

Cool.  Now in git head.

On Thu, 17 May 2012 18:29:24 +0200
Beat Bolli <address@hidden> wrote:

> By advancing the twirly baton only each 11th line, the whole
> regress-driver run is sped up by 7% when run over SSH.
> ---
>  gpsfake |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/gpsfake b/gpsfake
> index cccfb9d..029de3e 100755
> --- a/gpsfake
> +++ b/gpsfake
> @@ -31,10 +31,11 @@ class Baton:
>          if os.isatty(self.stream.fileno()):
>              if ch:
>                  self.stream.write(ch)
> -            else:
> +                self.stream.flush()
> +            elif self.count % 11 == 0:
>                  self.stream.write("-/|\\"[self.count % 4])
>                  self.stream.write("\010")
> -            self.stream.flush()
> +                self.stream.flush()
>          self.count = self.count + 1
>          return
>  




RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
        address@hidden  Tel:+1(541)382-8588

Attachment: signature.asc
Description: PGP signature


reply via email to

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