Revision: 2656 http://geany.svn.sourceforge.net/geany/?rev=2656&view=rev Author: ntrel Date: 2008-06-06 09:53:48 -0700 (Fri, 06 Jun 2008)
Log Message: ----------- Revert use of SCN_PAINTED - this is called much more often than SCN_UPDATEUI and slows down Geany.
Modified Paths: -------------- trunk/ChangeLog trunk/src/editor.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-06-06 16:38:34 UTC (rev 2655) +++ trunk/ChangeLog 2008-06-06 16:53:48 UTC (rev 2656) @@ -23,6 +23,9 @@ Also fix the document last_check assignment so that the disk is only polled every file_prefs.disk_check_timeout seconds (not sure how this got missing - maybe it was my fault?). + * src/editor.c: + Revert use of SCN_PAINTED - this is called much more often than + SCN_UPDATEUI and slows down Geany.
2008-06-05 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/editor.c =================================================================== --- trunk/src/editor.c 2008-06-06 16:38:34 UTC (rev 2655) +++ trunk/src/editor.c 2008-06-06 16:53:48 UTC (rev 2656) @@ -171,16 +171,19 @@ }
-/* Called before Scintilla repaints. - * Note: Any GUI updates that don't affect scintilla should be done in on_painted(). */ static void on_update_ui(gint idx, G_GNUC_UNUSED SCNotification *nt) { ScintillaObject *sci = documents[idx]->sci; gint pos = sci_get_current_position(sci);
+ /* undo / redo menu update */ + ui_update_popup_reundo_items(idx); + /* brace highlighting */ editor_highlight_braces(sci, pos);
+ ui_update_statusbar(idx, pos); + /* Visible lines are only laid out accurately once [SCN_UPDATEUI] is sent, * so we need to only call sci_scroll_to_line here, because the document * may have line wrapping and folding enabled. @@ -207,20 +210,6 @@ }
-/* Any GUI updates that don't affect scintilla should be done here to - * appear more responsive to typing. */ -static void on_painted(gint idx, G_GNUC_UNUSED SCNotification *nt) -{ - ScintillaObject *sci = documents[idx]->sci; - gint pos = sci_get_current_position(sci); - - /* undo / redo menu update */ - ui_update_popup_reundo_items(idx); - - ui_update_statusbar(idx, pos); -} - - static void check_line_breaking(gint idx, gint pos, gchar c) { GeanyDocument *doc = documents[idx]; @@ -467,10 +456,6 @@ on_update_ui(idx, nt); break;
- case SCN_PAINTED: - on_painted(idx, nt); - break; - case SCN_MODIFIED: { if (nt->modificationType & SC_STARTACTION && ! ignore_callback)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.