ei_rpc_from speedup?
Hal Snyder
hal@REDACTED
Fri Aug 22 04:23:08 CEST 2003
In R9C-0 lib/erl_interface/src/connect/ei_connect.c we see
(line numbers prepended)
922 FD_ZERO(&readmask);
923 FD_SET(fd,&readmask);
924
925 switch (select(FD_SETSIZE, &readmask, NULL, NULL, t)) {
On FreeBSD-5.0 at least, FD_SETSIZE defaults to 1024U. Isn't the
following patch an improvement (pointed out by Rick Pettit)?
--- ei_connect.c.orig Fri Aug 1 04:07:11 2003
+++ ei_connect.c Thu Aug 21 21:10:11 2003
@@ -922,7 +922,7 @@
FD_ZERO(&readmask);
FD_SET(fd,&readmask);
- switch (select(FD_SETSIZE, &readmask, NULL, NULL, t)) {
+ switch (select(fd + 1, &readmask, NULL, NULL, t)) {
case -1:
erl_errno = EIO;
return ERL_ERROR;
More information about the erlang-questions
mailing list