textview: cache paragraph render nodes
authorChristian Hergert <chergert@redhat.com>
Tue, 8 Oct 2019 18:35:49 +0000 (11:35 -0700)
committerChristian Hergert <chergert@redhat.com>
Tue, 8 Oct 2019 18:44:27 +0000 (11:44 -0700)
commit3b959456ac5335639e9642571f59f17ec8ee97f7
treee91aec6ef950a9bc0313690b69cbe288370a4f19
parent83eeeb6a19b3b7671a82605bc99cd85974d5c78e
textview: cache paragraph render nodes

We can avoid recreating a number of text nodes from render_para() on
sub-sequent runs if we cache the rendernode instead of just the
PangoLayout.

When used with GtkSourceMap, this can yield a ~7 FPS improvement during
smooth scrolling at the cost of some more memory.
gtk/gtktextlayout.c
gtk/gtktextlayoutprivate.h
gtk/gtktextlinedisplaycache.c