Jitter proportionate to size

Not not default size
This commit is contained in:
Martin Sumner 2018-06-07 18:08:54 +01:00
parent 95aa1c632b
commit 589d947c01

View file

@ -593,9 +593,12 @@ init([Opts]) ->
% Start from file not snapshot
{InkerOpts, PencillerOpts} = set_options(Opts),
CacheJitter = ?CACHE_SIZE div (100 div ?CACHE_SIZE_JITTER),
CacheSize = proplists:get_value(cache_size, Opts)
+ erlang:phash2(self()) rem CacheJitter,
CacheJitter =
proplists:get_value(cache_size, Opts)
div (100 div ?CACHE_SIZE_JITTER),
CacheSize =
proplists:get_value(cache_size, Opts)
+ erlang:phash2(self()) rem CacheJitter,
RecentAAE =
case proplists:get_value(recent_aae, Opts) of
false ->