mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-16 11:42:12 +08:00
Optimize performance for populating the database tree: SynEdit's InitializeKeywordLists() is very slow when you put a large number of dbs into SynEdit's list of tables - 10 seconds for 4,000 dbs here, vs. 1 second if we don't do that. Decided to remove that "feature", databases are not tables anyway. Fixes issue #1350.
This commit is contained in:
@ -6911,14 +6911,6 @@ begin
|
|||||||
|
|
||||||
showstatus( IntToStr( Databases.Count ) + ' Databases', 0 );
|
showstatus( IntToStr( Databases.Count ) + ' Databases', 0 );
|
||||||
ChildCount := Databases.Count;
|
ChildCount := Databases.Count;
|
||||||
// Avoids excessive InitializeKeywordLists() calls.
|
|
||||||
SynSQLSyn1.TableNames.BeginUpdate;
|
|
||||||
SynSQLSyn1.TableNames.Clear;
|
|
||||||
// Let synedit know all database names so that they can be highlighted
|
|
||||||
// TODO: Is this right? Adding "<db name>.<table name>" seems to make more sense..
|
|
||||||
for i := 0 to Databases.Count - 1 do
|
|
||||||
SynSQLSyn1.TableNames.Add(Databases[i]);
|
|
||||||
SynSQLSyn1.TableNames.EndUpdate;
|
|
||||||
finally
|
finally
|
||||||
ShowStatus( STATUS_MSG_READY );
|
ShowStatus( STATUS_MSG_READY );
|
||||||
Screen.Cursor := crDefault;
|
Screen.Cursor := crDefault;
|
||||||
|
Reference in New Issue
Block a user