I believe it depends on the platform's implementation of UT_gettimeofday().
The Win32 version calls GetSystemTimeAsFileTime(). The resolution of that
API probably isn't very high/fine - about every 15ms. See
<http://www.lochan.org/2005/keith-cl/useful/win32time.html>.
The Linux version of gettimeofday() can have microsecond resolution.
The code in UT_UUID::_makeUUID waits until either the tv_sec or the tv_usec
fields change. If they don't change, then the code calls UT_gettimeofday()
again until it does change. So the Win32 version is probably waiting around
for time to pass.
J
>From: msevior@physics.unimelb.edu.au
>To: "Johnny Lee" <typo_pl@hotmail.com>
>CC: abiword-dev@abisource.com
>Subject: Re: load time regression: Re: commit: Change Record UUID's
>Date: Sat, 15 Oct 2005 14:51:28 +1000 (EST)
>
>
> >
> > I grabbed the Abiword 2.4.1 source code and applied MSevior's checkin
>for
> > 9631 and changed the UUID::_makeUUID into an incrementing counter. This
> > got
> > the runtime for the "load RTF spec" test down to about 36 secs.
> >
> > See <http://www.geocities.com/typopl/bug5291.html#2005Oct14>
> >
>
>This is all very interesting but strange. On linux I #if 0'd out the
>relevent code in the constructor and tested the RTF-spec-1.7.rtf file. I
>saw no difference with or without the the UUID call.
>
>(The 1.7 spec loads in about 16 seconds on a 3.1 Ghz desktop.)
>
>I wonder if this call is a lot more expensive on Windows?
>
>Cheers
>
>Martin
>
> > J
> >
> >
> >
>
>
Received on Sat Oct 15 07:18:00 2005
This archive was generated by hypermail 2.1.8 : Sat Oct 15 2005 - 07:18:00 CEST