Hi Przemek,
Il 28/07/2009 22.09, Przemyslaw Czerpak ha scritto:
The above is not true. This functions is implemented in the worst
possible way for performance. It calls recv() to extract single byte.
It means that the cost of switching between user and kernel space
is horrible huge and can kill the performance. I've seen how slow
it can be in some small programs written for pocket PC with WinCE.
The problem can be resolved by introducing internal buffer to
HB_SOCKET_STRUCT used by hb_inet*() functions and reading data in
bigger peaces. But it also means that we will have to update other
hb_inet*() functions to respect data in this buffer which can appear
after calling hb_InetRecvLine() or hb_InetRecvEndBlock() and I do
not know if I should invest time in cleaning this whole interface.
Maybe we should think about writing new one from scratch using
new hb_socket*() C functions?
How many people use current hb_inet*() functions and how important
is backward compatibility for you?
I'm using hb_inet*() but I prefer to have new ones if give better
functionalities and performance.
TIA
Best Regards,
Francesco
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour