-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved performance of adding rows and columns to the WTable.
The issue was the calling of WTableRow::rowNum() for every added cell, which iterated over the whole table. The methods WTableRow::createCell() and WTableRow::insertColumn() got the new row argument defaulting to -1 that WTable can use when creating new elements with WTable::insertRow() and WTable::insertColumn(). These methods are called by WTable::expand() so the performance improvement affects every operation that expands the table. The performance of populating a new table row by row is increased with this commit from O(n^2+n) to O(n).
- Loading branch information
Showing
3 changed files
with
16 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters