mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-09 05:33:58 -04:00
pgo: feed VT data through fdm_ptmx(), not vt_from_slave()
fdm_ptmx(), the FDM callback handler for ptmx data, is just as much in the hot path as vt_from_slave(). It is also slightly more complicated than a read() followed by a call to vt_from_slave(). As a result, some benchmarks performed significantly worse in a partial PGO build than in a full PGO build, since fdm_ptmx() wasn’t PGO:d. To be able to feed data through fdm_ptmx(), we need to set up the delayed rendering timer FDs, configure the timeout values, and provide a readable FD it can read the VT data from. The latter is done with a memory FD. This ensures *all* VT data is loaded into memory before we feed it to the parser.
This commit is contained in:
parent
ecaa3b4135
commit
daa8d129c1
2 changed files with 64 additions and 7 deletions
|
|
@ -198,7 +198,9 @@ fdm_ptmx_out(struct fdm *fdm, int fd, int events, void *data)
|
|||
static struct timespec last = {0};
|
||||
#endif
|
||||
|
||||
static bool
|
||||
/* Externally visible, but not declared in terminal.h, to enable pgo
|
||||
* to call this function directly */
|
||||
bool
|
||||
fdm_ptmx(struct fdm *fdm, int fd, int events, void *data)
|
||||
{
|
||||
struct terminal *term = data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue