そりゃループの中で毎回 str += s; してるからだろ
str += s; は str = new StringBuilder(str).append(s).toString(); みたいなことになるから無駄だらけ