[GRASS5] g51 v.build accelerated

Radim Blazek radim.blazek at wo.cz
Mon Feb 18 18:49:38 EST 2002


On Monday 18 February 2002 08:43, Markus Neteler wrote:
> On Mon, Feb 18, 2002 at 08:18:53AM +0100, Andrea Aime wrote:
> > Radim Blazek wrote:
> > > v.build accelerated now:
> > >
> > > grass50  grass51
> > > 270s     9s     (with attributes)
> > > 124s     6s     (without attributes)
> > >
> > > How boring. Somebody should check, seems to be too good.
> >
> > Mmm, I haven't looked at the new code, but the old
> > version uses a hand made realloc that allocates a new
> > array and then copies the old array into the new
> > element by element, thus making
> > lots of works each time an array has to be enlarged
> > (according to the few comments available realloc was
> > buggy on Solaris at the time v.build was written) ...
> > maybe your new implementation uses the standard libc
> > realloc, which is much faster than this... just a guess
> > (maybe I am completely wrong)
> > ciao
> > Andrea Aime
>
> Ciao Andrea,
>
> is your comment a hint how to speed up the v.build in 5.0? :-)
> That would be really great. To build topology for the GSHHS shoreline
> data takes more than 2 days on an average machine (o.k., yes, it is
> possible and not crashing as seen with market place GIS software).

Reallocation is not the problem, most of the time is consumed by looking
for spatialy related objects - nodes, lines, labels. Time increases 
number of objects ^ 2 because build goes through all objects always.


-- 
Radim
Praga, Bohemia



More information about the grass-dev mailing list