]> granicus.if.org Git - libass/commit
cache: switch to gradual cache clearing
authorDr.Smile <vabnick@gmail.com>
Tue, 15 Sep 2015 17:18:17 +0000 (20:18 +0300)
committerDr.Smile <vabnick@gmail.com>
Thu, 30 Jun 2016 20:13:53 +0000 (23:13 +0300)
commit25d65abce1a0fabe3c3bf81f1ee7ee7f24b91a4e
treea5d82da3707fcf2801a960fbea70ccfca4052469
parent7d05b1d3b8d08672bd7297516514396d1d1a846f
cache: switch to gradual cache clearing

Advantages over the old algorithm consist of the following.
 * There are no glitches due to full cache clearing.
   Items are arranged into linked list ordered by time of last use.
   Only the oldest items get deleted at the clearing event.
 * Each item now keeps track of number of references.
   Referenced cache values are immune to clearing.
 * Reduced amount of total cache memory for the same performance.
 * Reduced number of memory allocations per cache item.
libass/ass_cache.c
libass/ass_cache.h
libass/ass_font.c
libass/ass_font.h
libass/ass_render.c
libass/ass_render.h
libass/ass_render_api.c
libass/ass_shaper.c