Opkman: Speed up the load of the package tree.

git-svn-id: trunk@62680 -
This commit is contained in:
balazs 2020-02-27 11:30:22 +00:00
parent 42beb70c91
commit ab0b56c0f8
2 changed files with 156 additions and 150 deletions

View File

@ -437,6 +437,7 @@ begin
case AErrTyp of
etNone:
begin
if (not Options.LoadJsonLocally) then
SetupMessage(rsMainFrm_rsMessageParsingJSON);
if (SerializablePackages.Count = 0) then
begin

View File

@ -331,6 +331,8 @@ begin
FVST.NodeDataSize := SizeOf(TData);
UniqueID := 0;
//add repository(DataType = 0)
FVST.BeginUpdate;
try
RootNode := FVST.AddChild(nil);
RootData := FVST.GetNodeData(RootNode);
RootData^.Repository := Options.RemoteRepository[Options.ActiveRepositoryIndex];
@ -489,6 +491,9 @@ begin
FVST.SortTree(0, laz.VirtualTrees.sdAscending);
ExpandEx;
CollapseEx;
finally
FVST.EndUpdate;
end;
RootNode := VST.GetFirst;
if RootNode <> nil then
begin