SynEdit: defer Highlight Scan => increased amount per idle

git-svn-id: trunk@25777 -
This commit is contained in:
martin 2010-05-30 17:36:40 +00:00
parent 46444dc603
commit 8457924769

View File

@ -386,6 +386,9 @@ type
implementation implementation
const
IDLE_SCAN_CHUNK_SIZE = 2500;
{$IFDEF _Gp_MustEnhanceRegistry} {$IFDEF _Gp_MustEnhanceRegistry}
function IsRelative(const Value: string): Boolean; function IsRelative(const Value: string): Boolean;
begin begin
@ -1312,8 +1315,8 @@ begin
EndIndex := CurrentRanges.NeedsReScanEndIndex + 1; EndIndex := CurrentRanges.NeedsReScanEndIndex + 1;
RealEndIndex := EndIndex; RealEndIndex := EndIndex;
if EndIndex > StartIndex + 100 then if EndIndex > StartIndex + IDLE_SCAN_CHUNK_SIZE then
EndIndex := StartIndex + 100; EndIndex := StartIndex + IDLE_SCAN_CHUNK_SIZE;
FIsScanning := True; FIsScanning := True;
try try
EndIndex := PerformScan(StartIndex, EndIndex, True); EndIndex := PerformScan(StartIndex, EndIndex, True);