Please cache `req.length` instead of accessing it on each iteration.