Performance optimizations for reader thread
Merge pull request #36 from lincolnthree/master

Performance optimizations for reader thread