codetools: accelerated loading include links

git-svn-id: trunk@14190 -
This commit is contained in:
mattias 2008-02-19 11:37:30 +00:00
parent fc54ba9a4c
commit e0c523e862

View File

@ -708,6 +708,7 @@ var LinkCnt, i: integer;
LastTimeUsed, CurrDate: TDateTime;
IncludeFilename, IncludedByFile, APath: string;
NewLink: TIncludedByLink;
CurrDateStr: String;
begin
try
FIncludeLinks.FreeAndClear;
@ -716,14 +717,13 @@ begin
FExpirationTimeInDays);
LinkCnt:=XMLConfig.GetValue(XMLPath+'IncludeLinks/Count',0);
CurrDate:=Date;
CurrDateStr:=DateToStr(CurrDate);
for i:=0 to LinkCnt-1 do begin
APath:=XMLPath+'IncludeLinks/Link'+IntToStr(i)+'/';
try
LastTimeUsed:=StrToDate(XMLConfig.GetValue(APath+'LastTimeUsed/Value',
DateToStr(CurrDate)));
except
if not TryStrToDate(XMLConfig.GetValue(APath+'LastTimeUsed/Value',
CurrDateStr),LastTimeUsed)
then
LastTimeUsed:=CurrDate;
end;
// ToDo: check if link has expired