diff options
author | Paul Ollis <paul@cleversheep.org> | 2022-06-05 16:55:54 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-06-05 16:55:54 +0100 |
commit | 6574577cacd393ab7591fc776ea060eebc939e55 (patch) | |
tree | f583ca9957280e7086b8d14ef44127302829fd40 /src/drawscreen.c | |
parent | 1d97db3d987c05af88c30ad20f537bcf3024f9c1 (diff) |
patch 8.2.5057: using gettimeofday() for timeout is very inefficientv8.2.5057
Problem: Using gettimeofday() for timeout is very inefficient.
Solution: Set a platform dependent timer. (Paul Ollis, closes #10505)
Diffstat (limited to 'src/drawscreen.c')
-rw-r--r-- | src/drawscreen.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/drawscreen.c b/src/drawscreen.c index ed8927127e..2c184bde0f 100644 --- a/src/drawscreen.c +++ b/src/drawscreen.c @@ -1474,9 +1474,6 @@ win_update(win_T *wp) #if defined(FEAT_SYN_HL) || defined(FEAT_SEARCH_EXTRA) int save_got_int; #endif -#ifdef SYN_TIME_LIMIT - proftime_T syntax_tm; -#endif #if defined(FEAT_SEARCH_EXTRA) || defined(FEAT_CLIPBOARD) // This needs to be done only for the first window when update_screen() is @@ -2182,8 +2179,7 @@ win_update(win_T *wp) #endif #ifdef SYN_TIME_LIMIT // Set the time limit to 'redrawtime'. - profile_setlimit(p_rdt, &syntax_tm); - syn_set_timeout(&syntax_tm); + init_regexp_timeout(p_rdt); #endif #ifdef FEAT_FOLDING win_foldinfo.fi_level = 0; @@ -2695,7 +2691,7 @@ win_update(win_T *wp) } #ifdef SYN_TIME_LIMIT - syn_set_timeout(NULL); + disable_regexp_timeout(); #endif // Reset the type of redrawing required, the window has been updated. |