sc/source/core/data/column4.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 00563949554ca52f7316e9c8769b4567d8875c88 Author: Michael Meeks <michael.me...@collabora.com> AuthorDate: Thu Oct 19 15:15:33 2023 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Fri Oct 20 11:26:58 2023 +0200 sc: perf: avoid construction of collector for empty note columns. It is extremely common to have empty note columns; so shorten this path profile in: cool#7334 Change-Id: Ibfd550be1a5e8e98df8b4ede0d018c4f85300648 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158182 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx index 49420642bf5f..aeb38e00150a 100644 --- a/sc/source/core/data/column4.cxx +++ b/sc/source/core/data/column4.cxx @@ -860,7 +860,9 @@ public: void ScColumn::GetAllNoteEntries( std::vector<sc::NoteEntry>& rNotes ) const { - std::for_each(maCellNotes.begin(), maCellNotes.end(), NoteEntryCollector(rNotes, nTab, nCol, 0, GetDoc().MaxRow())); + if (HasCellNotes()) + std::for_each(maCellNotes.begin(), maCellNotes.end(), + NoteEntryCollector(rNotes, nTab, nCol, 0, GetDoc().MaxRow())); } void ScColumn::GetNotesInRange(SCROW nStartRow, SCROW nEndRow,