To increase performanse when inserting many rows at a time use setRowCount() instead of insertRow().