[GRASS-dev] v.what.rast speedup

Markus Neteler neteler at fbk.eu
Tue Oct 23 07:29:29 EDT 2007



Glynn Clements wrote:
> 
> Markus Neteler wrote:
>> >> > You could try re-compiling the DBMI libraries with -DUSE_BUFFERED_IO
>> >> > to see if that helps at all.
> ...
> 
> However, I don't think that it's going to tell me much in this case;
> the driver is almost certainly at lib/db/dbmi_driver/driver.c:140 (the
> db__recv_procnum() call), with the status code still sitting in the
> send buffer.
> 
> Try the following patch:
> 
> --- lib/db/dbmi_base/xdr.c	15 Oct 2007 05:24:17 -0000	1.6
> +++ lib/db/dbmi_base/xdr.c	22 Oct 2007 21:39:28 -0000
> @@ -88,6 +88,9 @@
>  int db__recv(void *buf, size_t size)
>  {
>  #if USE_STDIO
> +#ifdef USE_BUFFERED_IO
> +    fflush(_send);
> +#endif
>      return fread(buf, 1, size, _recv) == size;
>  #elif USE_READN
>      return readn(fileno(_recv), buf, size) == size;
> 

This actually solves the problem. I have taken liberty to not debug 
in details but directly tried (successfully) the patch.
Then we are back to 25 seconds, also with -DUSE_BUFFERED_IO
(and DBF). With SQLite 7 seconds, it seems that the flag has no
relevant effect.

Markus

Markus
-- 
View this message in context: http://www.nabble.com/r.random%3A-now-with-optional-cover-map-parameter-tf4634057.html#a13362043
Sent from the Grass - Dev mailing list archive at Nabble.com.




More information about the grass-dev mailing list