term: start slave before loading fonts and starting rendering threads

This allows the client to load in parallel with our font loading,
which should improve startup time.
This commit is contained in:
Daniel Eklöf 2020-04-30 11:39:41 +02:00
parent 242bcb9550
commit ae5af7bb06
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -850,6 +850,14 @@ term_init(const struct config *conf, struct fdm *fdm, struct wayland *wayl,
.cwd = strdup(cwd),
};
/* Start the slave/client */
if ((term->slave = slave_spawn(
term->ptmx, argc, term->cwd, argv,
conf->term, conf->shell, conf->login_shell)) == -1)
{
goto err;
}
/* Guess scale; we're not mapped yet, so we don't know on which
* output we'll be. Pick highest scale we find for now */
tll_foreach(term->wl->monitors, it) {
@ -858,6 +866,7 @@ term_init(const struct config *conf, struct fdm *fdm, struct wayland *wayl,
}
initialize_color_cube(term);
/* Initialize the Wayland window backend */
if ((term->window = wayl_win_init(term)) == NULL)
goto err;
@ -886,14 +895,6 @@ term_init(const struct config *conf, struct fdm *fdm, struct wayland *wayl,
break;
}
/* Start the slave/client */
if ((term->slave = slave_spawn(
term->ptmx, argc, term->cwd, argv,
conf->term, conf->shell, conf->login_shell)) == -1)
{
goto err;
}
if (!initialize_render_workers(term))
goto err;