Bug Hunting Session
Bug 117212 - MAILMERGE: Save/Print Merged Documents command processes every record even when it is unnecessary
Summary: MAILMERGE: Save/Print Merged Documents command processes every record even wh...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2018-04-24 15:20 UTC by Gabor Kelemen
Modified: 2019-10-18 21:43 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example mail merge file (10.95 KB, application/vnd.oasis.opendocument.text)
2018-04-24 15:20 UTC, Gabor Kelemen
Details
Example mail merge data source with 3000 rows (81.89 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-04-24 15:22 UTC, Gabor Kelemen
Details
Let's save the first three merged document (118.20 KB, image/png)
2018-04-24 15:25 UTC, Gabor Kelemen
Details
Screenshot of the problem: Writer merges all documents even if only a few is requested (125.31 KB, image/png)
2018-04-24 15:26 UTC, Gabor Kelemen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen 2018-04-24 15:20:30 UTC
Created attachment 141598 [details]
Example mail merge file

If we have a large data source and we want to save/print the last few or the first few lines using Save Merged Documents or Print Merged Documents functions, the unification of the individual documents is unnecessarily slow, because the process goes through all the records.

Steps to reproduce:
1. Create a large data source in Excel/Calc
2. Create a new *.ods file in LibreOffice Writer and create a Mail Merge with the “Mail Merge Wizard...”
3. Use the “source.xlsx” table as a data source.
4. Insert some Mail merged fields into the document and pair it with the data source columns
5. Turn on the “Mail merge” toolbar at the View-→Toolbars.
6. On the Mail merge toolbar click on the “Save Merged Documents” or “Print Merged Documents” and choose the “From 1 To 3” Save As option in the pop-up window.
7. Click on the Save Documents


Actual results:
Mail Merge processes on every record when creating letters, even if we want to use only a subset of the source (e.g.: the first 3 lines from the table). This makes the mailmerge unnecessarily slow when dealing with large source file, even when only a few letters are created at a time.

Expected results:
Mail Merged should not processes every record when creating letters, if we want to use only a subset of the source (e.g.: the first 3 lines from the data source).

Version: 6.0.4.0.0+
Build ID: 30db8c9b1d9654e62c11657140fac24f0f52c547
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:libreoffice-6-0, Time: 2018-03-27_01:00:13
Locale: hu-HU (hu_HU); Calc: group
Comment 1 Gabor Kelemen 2018-04-24 15:22:15 UTC
Created attachment 141599 [details]
Example mail merge data source with 3000 rows
Comment 2 Gabor Kelemen 2018-04-24 15:25:22 UTC
Created attachment 141602 [details]
Let's save the first three merged document
Comment 3 Gabor Kelemen 2018-04-24 15:26:28 UTC
Created attachment 141603 [details]
Screenshot of the problem: Writer merges all documents even if only a few is requested
Comment 4 Buovjaga 2018-05-14 17:28:05 UTC
Setting to NEW