mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-04 19:50:54 +02:00
+ Faster inserts by sorting after all elements were parsed (suggestion by Mattias Gaertner)
This commit is contained in:
parent
63c6ea5abf
commit
88f43b8d18
@ -46,7 +46,6 @@ Constructor TSkelEngine.Create;
|
|||||||
begin
|
begin
|
||||||
Inherited Create;
|
Inherited Create;
|
||||||
FList:=TStringList.Create;
|
FList:=TStringList.Create;
|
||||||
FList.Sorted:=True;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Destructor TSkelEngine.Destroy;
|
Destructor TSkelEngine.Destroy;
|
||||||
@ -302,12 +301,14 @@ begin
|
|||||||
Try
|
Try
|
||||||
Engine1.SetPackageName('diff'); // do not localize
|
Engine1.SetPackageName('diff'); // do not localize
|
||||||
ParseSource(Engine1, InputFile1, OSTarget, CPUTarget);
|
ParseSource(Engine1, InputFile1, OSTarget, CPUTarget);
|
||||||
|
Engine1.FList.Sorted:=True;
|
||||||
if (InputFile2<>'') then
|
if (InputFile2<>'') then
|
||||||
begin
|
begin
|
||||||
Engine2:=TSkelEngine.Create;
|
Engine2:=TSkelEngine.Create;
|
||||||
Try
|
Try
|
||||||
Engine2.SetPackageName('diff'); // do not localize
|
Engine2.SetPackageName('diff'); // do not localize
|
||||||
ParseSource(Engine2, InputFile2, OSTarget, CPUTarget);
|
ParseSource(Engine2, InputFile2, OSTarget, CPUTarget);
|
||||||
|
Engine2.FList.Sorted:=True;
|
||||||
If cmdLineAction=ActionList then
|
If cmdLineAction=ActionList then
|
||||||
begin
|
begin
|
||||||
ListIdentifiers(InputFile1,Engine1.FList);
|
ListIdentifiers(InputFile1,Engine1.FList);
|
||||||
@ -333,7 +334,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.2 2004-11-14 21:20:31 michael
|
Revision 1.3 2004-11-15 18:03:28 michael
|
||||||
|
+ Faster inserts by sorting after all elements were parsed (suggestion by Mattias Gaertner)
|
||||||
|
|
||||||
|
Revision 1.2 2004/11/14 21:20:31 michael
|
||||||
+ Changed copyright
|
+ Changed copyright
|
||||||
|
|
||||||
Revision 1.1 2004/11/14 21:18:58 michael
|
Revision 1.1 2004/11/14 21:18:58 michael
|
||||||
|
Loading…
Reference in New Issue
Block a user