mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 11:17:57 +08:00
Optimize previous commit. Filtering the grid causes quite a bit CPU load, so we're now only doing the second search pass for unformatted numbers if the text to find is detected as an unformatted number.
This commit is contained in:
@ -7142,7 +7142,12 @@ begin
|
||||
// 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];
|
||||
if (Pos( search, LowerCase(CellText)) > 0) or (Pos(search, UnformatNumber(CellText)) > 0) then begin
|
||||
if Pos( search, LowerCase(CellText)) > 0 then begin
|
||||
match := True;
|
||||
break;
|
||||
end;
|
||||
// Search for unformatted numbers. Only if text to find is a number, to reduce CPU load for other cases.
|
||||
if IsNumeric(search) then if Pos(search, UnformatNumber(CellText)) > 0 then begin
|
||||
match := True;
|
||||
break;
|
||||
end;
|
||||
|
Reference in New Issue
Block a user