refactored the scap read loop to reduce the number of ring buffer checks, and as a consequence improved read speed