Cache symbol tree icons
commit62e6de9f10cd6143478c1f8f8b1004d50f502e65
authorJiří Techet <techet@gmail.com>
Thu, 11 Jun 2015 10:42:28 +0000 (11 12:42 +0200)
committerJiří Techet <techet@gmail.com>
Thu, 11 Jun 2015 10:42:28 +0000 (11 12:42 +0200)
treedd44a8dede66912acd47881cebb33b1911ebb783
parentccec1fe29acc88c72b8324d74d2e63c1b0bc8466
Cache symbol tree icons

When profiling Geany I/O activity, there are lots of I/O operations happening
when just typing in the editor caused by the updates of the symbol tree
and loading the icon files.

In addition, in the case of tag_other the leaves of the tree use
classviewer-var instead of the parent icon (e.g. with enums). In this case
the icon is loaded from the disk every time it's requested which takes
about 70% of the tree creation time when the tree consists only of such
nodes.

To fix these problems load the icons once and return the loaded icons when
requested instead of reloading them from the disk all the time.
src/symbols.c