first stab at perf
everything working
merge master
that easy to make it more snappy
Merge pull request #1165 from affektive/1081

closes #1081