On Mon, Mar 25, 2013 at 10:29 AM, Jean-Marc Lasgouttes
<lasgout...@lyx.org>wrote:

> Le 25/03/2013 10:23, Vincent van Ravesteijn a écrit :
>
>
>>               Add a WIN32 equivalent for gettimeofday
>>
>>         This function does not really returns the "time of day", but it
>>         will suffice to evaluate elapsed times.
>>
>>
>>     What's wrong with using timeGetTime instead? The choice I made was
>>     to use plain time to count also the time used by other processes (X
>>     server, kernel...). Whan using ticks (at least in linux) I think one
>>     does not get the time spent in othe rprocesses).
>>
>> timeGetTime only gets you a time in milliseconds. The example you gave
>> (about the Messages cache) clearly needs microsecond resolution.
>>
>
> OK, I am reading too fast, it seems. What does the performance look like
> with your fix to format code?
>
>
We could of course define separate macros. One that uses system time with
millisecond resolution (for the reasons you mentioned), and one that uses
'tick counts' for measuring with microsecond resolution.

With the fix, I can use LyX without the Messages cache and I hardly notice
any delays (compare this to the 2.6 second delay for each update before).
It has no influence on the timing results as they measure all the
individual translation requests, and it doesn't care about the amount of
requests. The only effect is that without the fix and with the Messsages
cache, the average time drops faster.

Vincent

Reply via email to