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



_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to