tigertext/pcache — pull request #12 by jaynel (2013-03-29 21:48:40+00:00)
Title: Drop in replacement for pcache to speed things up

Contains the following improvements:

1) Option to use pdict instead of ets (not recommended, speed up not significant or negative)

2) Added timing tests to compare different options

3) Added pcache:fetch to replace pcache:get
- Uses caller's thread to fetch Pid from ets (avoids gen_server bottleneck)
- Uses pcache:get if the value has never been fetched before
- Still receives all expiration notifications on the gen_server

Switching to use pcache:fetch should eliminate the timeouts we are seeing and should distribute the load better, providing less latency. My unit tests on the laptop, however, did not show speed increases. I believe using more cores will highlight performance improvements.

We should run 'rebar clean compile' then 'rebar unit suites=pcache' on 16 core machine to see what performance numbers are reported.

This only affects pcache, changes need to be made in xmpp to switch from pcache:get to pcache:fetch.