Bug 74516 - Performance of formula string compilation has become massively slower.
Summary: Performance of formula string compilation has become massively slower.
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: Other All
: medium critical
Assignee: Kohei Yoshida
URL:
Whiteboard: target:4.2.1
Keywords: perf, regression
Depends on:
Blocks:
 
Reported: 2014-02-04 16:46 UTC by Kohei Yoshida
Modified: 2015-12-15 11:37 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
test case (257.60 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-02-05 17:24 UTC, Laurent Godard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kohei Yoshida 2014-02-04 16:46:56 UTC
Performance of formula string compilation has become somewhat slower due to the fact that we process all sheet names each time ScCompiler is invoked.  This may be fine when compiling formula strings individually, but can cause significant slow-down when compiling a large number of formula strings in a single run.

One place we've noticed is when updating Calc's internal named range container which invokes re-compilations of all formula cell strings.
Comment 1 Kohei Yoshida 2014-02-04 16:47:43 UTC
I'm on it.
Comment 2 Kohei Yoshida 2014-02-04 21:23:35 UTC
It's done on master. The backport request is here: https://gerrit.libreoffice.org/7861
Comment 3 Laurent Godard 2014-02-05 17:24:06 UTC
Created attachment 93465 [details]
test case

file contains 400 sheets, 25 formula on each, 10k namedRanges

use macro testAddNRFromTitle to add 10 named ranges
Comment 4 Laurent Godard 2014-02-05 17:25:17 UTC
evaluation of test case file

Libro354 --> 0.222 s
Libro414 --> 0.341 s
Libro4204 --> 4.441 s
current Master with patch  --> 0.725 s
Comment 5 Commit Notification 2014-02-06 14:37:36 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=99a835ca644d69241cba9d7e4c4a315a4a3ea652&h=libreoffice-4-2

fdo#74516: Avoid excessive building of escaped sheet names.


It will be available in LibreOffice 4.2.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2014-02-06 14:38:28 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=99a835ca644d69241cba9d7e4c4a315a4a3ea652&h=libreoffice-4-2

fdo#74516: Avoid excessive building of escaped sheet names.


It will be available in LibreOffice 4.2.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Kohei Yoshida 2014-02-06 14:47:24 UTC
This is now backported.
Comment 8 Robinson Tryon (qubit) 2015-12-15 11:37:26 UTC
Migrating Whiteboard tags to Keywords: (perf)
[NinjaEdit]