linuxmint/xed

Searching on very long lines causes 100% CPU usage on one core for minutes.

Opened this issue · 1 comments

 * Xed version (xed -- 3.0.2)
 * Distribution - (LMDE4)

Issue
Searching on very long lines causes 100% CPU usage on one core for many minutes.
I tried to search for 'image' in a small XML file [ 16,783 bytes ] which had been created as a single long line.

Searching started as soon as the 'im' was entered (although it only searched for matches with 'i' and at this point the xed window locked up - with exception of the x (force close window).

Steps to reproduce

Open and search this file:-

Eric Frank Russell - The COMPLEAT Collected SFF Works.TXT

Note:- forced to change the "extension" from .opf to TXT for upload.
However, behaviour is the same with mimetype = text/plain as with application/xml

Expected behaviour

Search on a 16K file should be super-fast.

Other information

haarp commented

Could be related to #174. Basically anything that doesn't have frequent newlines sprinkled throughout it will make gedit, Pluma and xed go haywire with CPU usage, usually requiring it to be killed.