Download it now!
Bug 35357 - api is really slow if source file contains named ranges
Summary: api is really slow if source file contains named ranges
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
3.3.1 release
Hardware: Other All
: medium normal
Assignee: Kohei Yoshida
Whiteboard: target:3.4.3
Depends on:
Reported: 2011-03-16 08:00 UTC by Laurent Godard
Modified: 2011-07-19 12:03 UTC (History)
0 users

See Also:
Crash report or crash signature:

the macro to test (9.66 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-03-16 08:01 UTC, Laurent Godard
the sample source file (deleted)
2011-03-16 08:02 UTC, Laurent Godard
the GOOD source sample file (41.13 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-07-11 05:38 UTC, Laurent Godard
a patch that refactor SetNamedRanges (7.08 KB, patch)
2011-07-15 11:23 UTC, Laurent Godard

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Godard 2011-03-16 08:00:21 UTC
To copy a sheet between to files, i use the api
it works


if the source files contains named ranges, the process is 10 times more slow.

attached 2 files

- sourceSample.ods : 
the source file containing named ranges. we will copy the first sheet 

- macroToTestNamedRanges.ods :
Some macros that will copy the first sheet of the source to a new file
edit the macro and change the working path containing sourceSample.ods (marked with a XXX comment). this is the only thing to modify
can be used in 2 modes depending on the response on the question (copy with and without named Ranges in source)
Comment 1 Laurent Godard 2011-03-16 08:01:16 UTC
Created attachment 44502 [details]
the macro to test
Comment 2 Laurent Godard 2011-03-16 08:02:35 UTC
Created attachment 44503 [details]
the sample source file
Comment 3 Yifan Jiang 2011-03-16 22:32:30 UTC
Reproduced with libreoffice 3.3.1 SLED 11 sp1. 

Send it to Noel have a review.
Comment 4 Kohei Yoshida 2011-03-21 18:57:18 UTC
I can take a look at this.  Laurent and I have talked about this on IRC.
Comment 5 Tollef Fog Heen 2011-07-11 05:34:02 UTC
The content of attachment 44503 [details] has been deleted by
    Tollef Fog Heen <>
who provided the following reason:

IM conversation with mmeeks

The token used to delete this attachment was generated at 2011-07-11 05:33:45 PDT.
Comment 6 Laurent Godard 2011-07-11 05:38:20 UTC
Created attachment 48970 [details]
the GOOD source sample file

the previous is no more valid
Comment 7 Laurent Godard 2011-07-15 11:23:17 UTC
Created attachment 49157 [details]
a patch that refactor SetNamedRanges
Comment 8 Laurent Godard 2011-07-15 11:25:47 UTC
with the patch, the test case shows a drop of 5.78 seconds to 0.93 seconds for the file with 1211 named ranges

potentially also improves normal load of files containing lots of namedRanges
Comment 9 Kohei Yoshida 2011-07-19 12:03:08 UTC
Laurent's patch has been reviewed and pushed to the -3-4 branch and to master.  This will be fixed in 3.4.3 and later.