diff options
author | N-R-K <79544946+N-R-K@users.noreply.github.com> | 2021-11-25 22:04:02 +0100 |
---|---|---|
committer | NRK <nrk@disroot.org> | 2021-11-25 22:09:46 +0100 |
commit | 0639047dde5d3ccb35f9c1a7be3266a373945b6e (patch) | |
tree | 563ad08dfe45535136de5de3d713266e8ea617b1 /image.c | |
parent | 43960312333bc9d9a6a8a95fff3563044856eccf (diff) | |
download | nsxiv-0639047dde5d3ccb35f9c1a7be3266a373945b6e.tar.zst |
allow configuring imlib2's cache size (#171)
by default imlib2 uses a 4mb cache, which is quite small. this allows
users who have more memory to spare to set a bigger cache size and avoid
reloading an already viewed image if it fits into the cache.
Co-authored-by: Berke Kocaoğlu <berke.kocaoglu@metu.edu.tr>
Diffstat (limited to 'image.c')
-rw-r--r-- | image.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -48,6 +48,7 @@ void img_init(img_t *img, win_t *win) imlib_context_set_display(win->env.dpy); imlib_context_set_visual(win->env.vis); imlib_context_set_colormap(win->env.cmap); + imlib_set_cache_size(CACHE_SIZE); img->im = NULL; img->win = win; |