Apply line limit to avoid browser pending problem