path: root/vcl
diff options
authorJustin Luth <>2017-02-08 19:08:07 +0300
committerBartosz Kosiorek <>2017-02-10 17:13:53 +0000
commit09e9274fc080b471393b806617eb03124db67590 (patch)
tree8d98aae4ea6885502b9ada04e1f8e7fe2b378abf /vcl
parent07bcdbaed1427549e29af00107b99878b9a66a72 (diff)
Optimize Excel GetOrCreateRow: reduce loops
for ( size_t nFrom = maRowMap.size(); nFrom <= nXclRow; ++nFrom ) This previous code worked best under the assumption that every row is added to the map. However, the size of the map actually has no correlation to the row numbers contained in it when many rows are identical to each other (think silly formatting and empty rows - related to tdf#105840) Thus row 1,000,000 could occupy slot 2, and every access of that row would then trigger nearly 1 million redundant loops. Optimize: -check to see if the row already exists - if so do nothing. -existance of higher rows indicates there are no missing rows. -build missing rows from the previously-mapped row. Change-Id: Ib02520a1bf0f77b5ca0ec5ad3165ff7ea879515f Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Bartosz Kosiorek <>
Diffstat (limited to 'vcl')
0 files changed, 0 insertions, 0 deletions