Re: droped out precise time calculations in src/interfaces/libpq/fe-connect.c
От | Joe Conway |
---|---|
Тема | Re: droped out precise time calculations in src/interfaces/libpq/fe-connect.c |
Дата | |
Msg-id | 3DACFABE.5060005@joeconway.com обсуждение исходный текст |
Ответ на | Re: droped out precise time calculations in src/interfaces/libpq/fe-connect.c (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: droped out precise time calculations in src/interfaces/libpq/fe-connect.c
|
Список | pgsql-hackers |
Bruce Momjian wrote: > Yes, the new code has _three_ time() calls, rather than the old code > that I think only had two. I was going to mention it but I figured > time() was a pretty light system call, sort of like getpid(). > > I needed the additional time() calls so the computation of remaining > time was more accurate, i.e. we are not resetting the timer on a > select() EINTR anymore. > > Should I try to rework it? > I tried two more runs of 10000, and the average is pretty steady at 0.0087. However the total range is a fair bit wider than I originally reported. I added a forth time() call to see what the effect would be. It increased the average to 0.0089 (two runs of 10000 connects each), so I don't think the time() call explains the entire difference. Not sure this is worth worrying about or not. I'd guess anyone serious about keeping connect time to a minimum uses some kind of connection pool or persistent connection anyway. Joe
В списке pgsql-hackers по дате отправления: