On Thu, 23 Sep 2021 09:03:13 -0400 Ken Brown wrote: > On 9/23/2021 4:26 AM, Takashi Yano wrote: > > * Make temporary_query_hdl() faster. > > Thanks! Again, I'm not familiar with the Windows functions that you used, so > Corinna should review this too when she returns. > > I have one question: > > The documentation at > https://docs.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-enumprocesses > says, "There is no indication given when the buffer is too small to store all > process identifiers. Therefore, if lpcbNeeded equals cb, consider retrying the > call with a larger array." > > Does this mean that EnumProcesses could return TRUE even if the buffer is too small? Ah, right. Thanks for pointing out that mistake. I have fixed that. P.S. I measured the response of select(). The first time and second time response is measured. Only the first time takes long response time because the cached info is used in the second time. This patch improves the response much. Also, caching info is very effective. First time, Second time Without this patch: 19.427600 [msec], 0.113900 [msec] With this patch: 3.344600 [msec], 0.115000 [msec] -- Takashi Yano