faster initial render

This commit is contained in:
nova
2026-06-23 21:42:10 +02:00
parent 7a3de19314
commit edab9a62ad
+9 -1
View File
@@ -18,7 +18,7 @@ unsigned int terminal_width;
unsigned int temp_heigth = 0; /*used for screen refresh*/
unsigned int temp_width = 0;
unsigned int file_modifiers = 0;
unsigned int status = (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_CLEAR | STATUS_UPDATE_SCREEN_RESIZE | STATUS_RELOAD_DIRECTORY) & ~STATUS_UPDATE_SCREEN_RESIZE;
unsigned int status = (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_CLEAR | STATUS_UPDATE_SCREEN_RESIZE | STATUS_RELOAD_DIRECTORY);
char *global_path;
time_t seed;
@@ -75,6 +75,14 @@ int main(){
timeout(SETTINGS_CURSES_TIMEOUT);
/* initial render pass to speed first render up,
* yes this only skips SETTINGS_CURSES_TIMEOUT, which by default is 100ms,
* but i started to write th out of spite; because anything else either is too slow and unresponsive
* or i just dont like their ux.
* will i ever make use of the 100ms? will i ever react and do faster inputs? no
* does it feel more responsive? sure does */
pthread_cond_signal(&cond_mid);
render_pass();
while(!(status & STATUS_QUIT_PROGRAM)){
getmaxyx(stdscr, terminal_height, terminal_width);