move loops outside

git-svn-id: http://protostuff.googlecode.com/svn/trunk@1602 3b38d51a-9144-11de-8ad7-8b2c2f1e2016