Bug 87909 - Search and Replace can grind to a halt on large documents for certain strings
Summary: Search and Replace can grind to a halt on large documents for certain strings
Status: RESOLVED DUPLICATE of bug 80715
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.1 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest, perf, regression
Depends on:
Blocks:
 
Reported: 2014-12-31 14:06 UTC by Oldbwl
Modified: 2015-12-15 11:23 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oldbwl 2014-12-31 14:06:29 UTC
A simple search for $ and replace with (say) Z2Z with Regular Expressions enabled will only work on small documents. 

In all mt RTF documents I use a series of macros to format and tidy the documents to a standard output. The above search and replace is only one of many simple steps which remove indents, join together paras where the line is broken unintentionally etc.

On a small document the process works fine. Once there is say 300 A4 pages, the process never fully ends.

In the 3x series, this was a rapid time to completion, regardless of size of document.

Changing allocated memory via options has not had any appreciable effect. I do however suspect a memory leak at this time as I see resources used continuously increasing during the process. Force quit is required to resume.
Comment 1 Oldbwl 2014-12-31 14:09:49 UTC
Running the same process in the latest OpenOfiice (4.1) shows that the Search and Replace completes very effectively.
Comment 2 Yousuf Philips (jay) (retired) 2014-12-31 20:55:26 UTC
Hi Oldbwl,

Thank you for reporting the bug. Is it possible for you to supply us with a sample document so we can run tests on it to determine where the problem arises.
Comment 3 Oldbwl 2015-01-02 06:19:40 UTC
Documents sent by email to Jay Philips
Comment 4 Yousuf Philips (jay) (retired) 2015-01-02 20:21:31 UTC
Thanks Oldbwl for the document. The problem seems to have arisen starting in the 4.1 branch.

Performance Tests :-

4.0.6 : 2 secs
4.4.0 : > 5 minutes (canceled when it reached there)

Version: 4.4.0.1.0+
Build ID: 4774b2f0e6a0e895d1e63256147eaff59efd0eda
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:libreoffice-4-4, Time: 2014-12-29_17:48:44
Comment 5 Michael Meeks 2015-01-03 11:04:32 UTC
Hmm, search & replace over a few hundred pages (how many cells and with what content ?) - should be quick. Then again, an ICU upgrade seems to have been behind a lot of slow-downs in recent LibreOffice/calc bits.

It'd be really nice to have either a document that displays this problem; or a series of simple instructions to build a document that reproduces this. Also - Eike is rather an expert in ICU-ness and calc, so CC'ing him =)

Thanks !
Comment 6 Yousuf Philips (jay) (retired) 2015-01-03 22:54:37 UTC
(In reply to Michael Meeks from comment #5)
> Hmm, search & replace over a few hundred pages (how many cells and with what
> content ?) - should be quick. Then again, an ICU upgrade seems to have been
> behind a lot of slow-downs in recent LibreOffice/calc bits.

The supplied document is an rtf with 181 pages loaded in Writer, which the search replaced 2011 instances of regexp '$' with 'Z2Z'.

> It'd be really nice to have either a document that displays this problem; or
> a series of simple instructions to build a document that reproduces this.
> Also - Eike is rather an expert in ICU-ness and calc, so CC'ing him =)

The document has a novel/story structure, meaning simple paragraph text with quotes when people are speaking.

@Oldbwl: Is it okay for me to share the document with the developers for testing?
Comment 7 Oldbwl 2015-01-04 13:16:06 UTC
@JayPhillips: As long as it is not published online yes,
Comment 8 Michael Meeks 2015-01-05 11:32:51 UTC
Almost certainly a duplicate - and 80715 is better isolated to a single commit =)

*** This bug has been marked as a duplicate of bug 80715 ***
Comment 9 Robinson Tryon (qubit) 2015-12-15 11:23:35 UTC
Migrating Whiteboard tags to Keywords: (perf bibisectRequest)
[NinjaEdit]