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:
Ansgar Becker
2009-09-11 19:53:37 +00:00
parent 8f52879369
commit 5e35c1811d

View File

@ -6911,14 +6911,6 @@ begin
showstatus( IntToStr( Databases.Count ) + ' Databases', 0 );
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
ShowStatus( STATUS_MSG_READY );
Screen.Cursor := crDefault;