[evince/wip/nielsdg/lazy-load-annotations] ev-view: Lazily create annotation windows
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/wip/nielsdg/lazy-load-annotations] ev-view: Lazily create annotation windows
- Date: Fri, 3 Jan 2020 10:32:03 +0000 (UTC)
commit 77e9f1b641f49526cd15e46889958a87fabb5333
Author: Niels De Graef <nielsdegraef gmail com>
Date: Fri Jan 3 11:19:16 2020 +0100
ev-view: Lazily create annotation windows
`EvView` creates a window for each annotation when the page loads, which
isn't really necessary as the window will be created when the annotation
gets clicked. As such, we can remove this creation on page load so
evince only creates annotation windows when necessary.
This (parially) fixes large memory usage of Evince when loading a
document with a lot of annotations. The problem seemed to be that
`EvAnnotationWindow` loads a `GSpellTextView` with its own
`HunspellChecker` instance, creating a lot of unnecessary overhead.
Partially fixes https://gitlab.gnome.org/GNOME/evince/issues/1010
libview/ev-view.c | 2 --
1 file changed, 2 deletions(-)
---
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 31d7caef..802ca493 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -3276,8 +3276,6 @@ show_annotation_windows (EvView *view,
window = get_window_for_annot (view, annot);
if (window) {
ev_view_window_child_move_with_parent (view, window);
- } else {
- ev_view_create_annotation_window (view, annot, parent);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]