Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

New Regular Expression filter feedback

Arffeh's profile image Arffeh posted 1 year ago in Feature discussion Permalink


When deleting the contents of the new Regular Expression filter below the results table, it seems like it's actually attempting to apply a regex filter of "" (blank), rather than just discarding->resetting the view, which theoretically should be fairly fast.

This is noticeable when applying a filter on a large result-set. For example, a filter that takes 20 seconds to execute, also takes that long upon deleting it to show the full set again.

ansgar's profile image ansgar posted 1 year ago Permalink

No, the regular expression is not executed when it's empty. The code for it looks like this:

while Assigned(Node) do begin
    // Don't filter anything if the filter text is empty
    match := rx.Expression = '';
    // Search for given text in node's captions
    if not match then for i := 0 to VT.Header.Columns.Count - 1 do begin
      CellText := VT.Text[Node, i];
      match := rx.Exec(CellText);
      if match then
    VT.IsVisible[Node] := match;
    if match then
    Node := VT.GetNext(Node);

What does take a bit is this one:

VT.IsVisible[Node] := match

Probably I can make it faster by wrapping the loop in a BeginUpdate/EndUpdate block, to postpone message processing to later.

Code modification/commit 94ae69e from Ansgar Becker <>, 1 year ago, revision 5398
Wrap filtering grid data in BeginUpdate/EndUpdate, so it might get a bit faster. See
ansgar's profile image ansgar posted 1 year ago Permalink

Just done that. Please check the upcoming new build.

Please login to leave a reply, or register at first.