[gspell: 5/5] InlineCheckerTextBuffer: reduce timeout duration when buffer modified



commit 949e194fa0ddb0f3f7c14b8997b9016ab5615cac
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Apr 2 14:59:57 2017 +0200

    InlineCheckerTextBuffer: reduce timeout duration when buffer modified
    
    Now that the check_subregion() function has a faster implementation (in
    most cases it takes less than 16.67 ms to execute on my computer, for a
    single line of text), it's useless to wait a long time before checking
    the spelling.
    
    With the long line provided in:
    https://bugzilla.gnome.org/show_bug.cgi?id=776811
    writing new text or deleting text is now responsive.
    
    60 FPS is not always achieved, but it feel responsive.

 gspell/gspell-inline-checker-text-buffer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gspell/gspell-inline-checker-text-buffer.c b/gspell/gspell-inline-checker-text-buffer.c
index acf0e36..0bddc49 100644
--- a/gspell/gspell-inline-checker-text-buffer.c
+++ b/gspell/gspell-inline-checker-text-buffer.c
@@ -80,7 +80,7 @@ typedef enum
 /* Timeout durations in milliseconds. Writing and deleting text should be smooth
  * and responsive.
  */
-#define TIMEOUT_DURATION_BUFFER_MODIFIED 400
+#define TIMEOUT_DURATION_BUFFER_MODIFIED 16
 #define TIMEOUT_DURATION_DRAWING 20
 
 G_DEFINE_TYPE (GspellInlineCheckerTextBuffer, _gspell_inline_checker_text_buffer, G_TYPE_OBJECT)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]