#2150 closed Bug (fixed)
Find dialog hangs when searching for word not found in a larger text
Reported by: | Jon Håvard Gundersen | Owned by: | Martin Kou |
---|---|---|---|
Priority: | Normal | Milestone: | FCKeditor 2.6.1 |
Component: | General | Version: | SVN (FCKeditor) - Retired |
Keywords: | Confirmed Review+ | Cc: |
Description
Scenario:
- Paste a larger text into the editor (i.e. the gpl license http://www.gnu.org/licenses/gpl-3.0.txt)
- Open the find dialog and search for word not found in the text.
- The scripts hangs and after a while the browser ask to stop the script.
Tested in nightly build with firefox on linux and ie7 on windows.
Attachments (7)
Change History (23)
comment:1 Changed 17 years ago by
Keywords: | Confirmed added |
---|---|
Milestone: | → FCKeditor 2.6.1 |
Version: | → SVN |
comment:2 Changed 17 years ago by
btw the search seems to have gotten stuck somewhere in the middle of the GNU license so I'm quite sure this is a bug rather than a speed issue.
comment:3 Changed 17 years ago by
Tested on IE6, IE7 and FF2 - in all of my tests the browsers collapsed.
comment:4 Changed 17 years ago by
Owner: | set to Martin Kou |
---|---|
Status: | new → assigned |
comment:5 Changed 17 years ago by
I was wrong yesterday. Further tests indicated that the search logic didn't actually got stuck, but the GetData() function took longer and longer to execute per call as the search proceeds down the document.
Changed 17 years ago by
Attachment: | 2150_pre.patch added |
---|
comment:6 Changed 17 years ago by
I've written a preliminary patch which re-implements the finding logic of the Find/Replace dialog. Improvements include:
- A factor-of-ten or greater improvement in searching performance, which eliminates the freeze up in searching long documents like the GPL 3.0. Note that while the new implementation would no longer hang scanning the GPL 3.0, it would still hang if given a much larger document - any classical search function still has to scan every DOM node and every character of the document no matter how fast it is, we aren't using quantum computers/quantum algorithms yet ;).
- Reduced code size of fck_replace.html, because the new algorithm is simpler.
comment:7 Changed 17 years ago by
The preliminary patch should be nearly completely functional, the only thing that doesn't work yet is the "Match whole word" option.
Changed 17 years ago by
Attachment: | 2150.patch added |
---|
comment:9 Changed 17 years ago by
Keywords: | Review? added |
---|
Changed 17 years ago by
Attachment: | 2150_2.patch added |
---|
comment:10 Changed 17 years ago by
Updated patch which removes the FCKDomTools.ScrollIntoView() hack for Safari in the Find/Replace dialog, because the hack was found to not work.
Changed 17 years ago by
Attachment: | 2150_3.patch added |
---|
comment:11 Changed 17 years ago by
Updated the patch again because the match whole word option was found to not work after the search has scanned through the document the first time.
comment:12 Changed 17 years ago by
Keywords: | Review- added; Review? removed |
---|
The patch is breaking simple searchs. Just try to search for "a", hitting the search button several times. It will throw a js error.
Changed 17 years ago by
Attachment: | 2150_4.patch added |
---|
comment:13 Changed 17 years ago by
Keywords: | Review? added; Review- removed |
---|
Changed 17 years ago by
Attachment: | 2150_5.patch added |
---|
Changed 17 years ago by
Attachment: | 2150_6.patch added |
---|
comment:14 Changed 17 years ago by
Keywords: | Review+ added; Review? removed |
---|
comment:15 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed with [1973].
Click here for more info about our SVN system.
Confirmed. It's a pretty major bug so I'm targeting it to 2.6.1.