From 4e95220d9759b4ba65327fd33a6a9d5ca56445f8 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sun, 6 Jan 2013 19:37:52 -0600 Subject: [PATCH] speed up tab switching I belive this should only be noticeable at the human timescale level when the tabs have been switched to already and, in that case, seems to go from 3-400 msec to 50-60 msec on my machine Essentially all of that time is in redrawing the buffer, so that 50-60 msec is proportional to the height of the DrRacket window, roughly. (The commit just makes drracket do a single redraw instead of about 4 or so of them per switch ...) --- collects/drracket/private/unit.rkt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/collects/drracket/private/unit.rkt b/collects/drracket/private/unit.rkt index 7d2b041239..6974162e61 100644 --- a/collects/drracket/private/unit.rkt +++ b/collects/drracket/private/unit.rkt @@ -3001,8 +3001,9 @@ module browser threading seems wrong. (set! definitions-text (send current-tab get-defs)) (set! interactions-text (send current-tab get-ints)) - (begin-container-sequence) + (send definitions-text begin-edit-sequence) + (send interactions-text begin-edit-sequence) (for-each (λ (defs-canvas) (send defs-canvas set-editor definitions-text #f)) definitions-canvases) (for-each (λ (ints-canvas) (send ints-canvas set-editor interactions-text #f)) @@ -3027,6 +3028,8 @@ module browser threading seems wrong. (for-each (λ (ints-canvas) (send ints-canvas refresh)) interactions-canvases) (set-color-status! (send definitions-text is-lexer-valid?)) + (send definitions-text end-edit-sequence) + (send interactions-text end-edit-sequence) (end-container-sequence)))) (define/pubment (on-tab-change from-tab to-tab)