[Mono-dev] Unexpected Delays in P/Invoke
Jason Curl
jcurlnews at arcor.de
Sat Apr 23 20:53:24 UTC 2016
Hello,
My method for measurement was wrong. I changed to gettimeofday() which
shows that close(handle->fd) is the culprit and not Mono.
Thankyou for your time and sorry for the noise.
Jason.
On 23.04.2016 17:49, Jason Curl wrote:
> Hello Miguel,
>
> You can see in the code, the last timed element is fclose(f), which is
> just closing the file used for diagnostics writing in the timing code,
> which when removed, still leaves 6900ms (it varies between 5000ms and
> > 10000ms).
>
> But I will look at if there is something else I can do based on your hint.
>
> Regards,
> Jason.
>
>
> On 23/04/2016 17:40, Jason Curl wrote:
>> Hello Miguel,
>>
>> > c: serial_close(handle=0x7fe044008d80) close(fd) elapsed=21,530000
>>
>> The time is from when the function entered (using the clock()
>> function) and the end.
>>
>> There seems to be about 6900ms between calling the P/Invoke method
>> and when the function actually gets called. You'll see a second call
>> later works as expected (the C method takes 0,066000ms and the .NET
>> says 0ms using).
>>
>> On 23/04/2016 17:15, Miguel de Icaza wrote:
>>> Time the C calls, it is possible that close is flushing the data and
>>> is not returning until that happebs
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20160423/813327a0/attachment.html>
More information about the Mono-devel-list
mailing list