Bug #65262 'edit -> replace' operation is very slow (takes minutes to complete)
Submitted: 9 May 2012 15:29 Modified: 19 Jul 2012 21:32
Reporter: Bogdan Fürst Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S5 (Performance)
Version:5.2.39 OS:Windows (Microsoft Windows 7 Ultimate Edition (build 7600), 64-bit)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[9 May 2012 15:29] Bogdan Fürst
Description:
From my own experience, i came to conclusion that a code validation or some other time consuming operation is executed for each replacement during replace operation.
No other text operation takes so long, not even opening the file itself...

note: There is a possibility that the repeat procedure below may not reproduce the issue, which may be related to my script content only.

How to repeat:
create/open an sql script;
define identifier `xxx`, i.e. "CREATE PROCEDURE IF EXISTS `xxx`() ...";
insert 10000 calls to identifier `xxx` or more (great number 10000 is only to make symptoms more obvious);
replace identifier `xxx` with a properly defined identifier `yyy` -> behavior ok, replace takes ~1[s];
replace identifier `xxx` with an invalid identifier, i.e. `yyy` (not defined in USE or script itself) -> not ok, takes minutes;
[11 May 2012 8:57] Valeriy Kravchuk
For me on older laptop with 1G of RAM and Windows XP any mass replace operation in script of 3000+ simple statements like:

select * from mysql.user;

is too slow. Even if I replace "from" with "FROM" and do not "produce" any wrong syntax or semantics.
[19 Jul 2012 21:32] Philip Olson
This has been fixed as of the soon-to-be-released Workbench 5.2.41, and 
here's the changelog entry:

The "Edit", "Find", "Find and Replace" operation was slow.