Optimizing Nested Loops for Table Iteration in ProseMirror's tableview.ts

Is there a more effective way to handle nested for loops in tableview.ts in ProseMirror, or is using a loop inside a loop the most efficient approach for iterating through table rows and cells?" tableview.ts

I don’t see any reason a nested loop would have efficiency issues.