Preallocate memory for image/file presence caches

Should avoid unnecessary reallocations.

(cherry-picked from commit 949266b5aa)
This commit is contained in:
Charles Dang 2018-05-22 00:27:22 +11:00
parent e6e8e20551
commit 6265087354

View file

@ -106,6 +106,7 @@ public:
cache_type()
: content_()
{
content_.reserve(20000);
}
cache_item<T>& get_element(int index)