-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Hi,
I'm trying out fm.serveContent("cgi", ...) with cgit. Cgit itself takes ~20ms on a simple page, but when running it through fullmoon's CGI module the request takes ~520 ms (measured with time curl ...).
The issue seems to occur at
Line 1728 in 9d62cff
| local se = (unix.poll({[rfd1] = unix.POLLIN}, maxtime*1000/10) or {})[rfd1] or 0 |
When using the default
maxtime of 5, maxtime*1000/10 makes a 500ms timeout which makes up all the unexpected added time. It seems that the poll will not return even when the process is closed. When hardcoding the timeout to 1ms the request is finished in the expected ~20ms, with the downside that this poll is called >100 times.Maybe a solution would be to make poll react to the process closing or if that's not possible starting at a low timeout and each iteration exponentially increasing that until
maxtime is reached.Tested on Debian 12 with the latest redbean and latest fullmoon.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels