mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 987814 - HTTP cache v2: initial index build happens immediately after the profile is open, r=honzab
This commit is contained in:
parent
5180873f02
commit
7039482575
@ -24,8 +24,7 @@
|
||||
#define kMinDumpInterval 20000 // in milliseconds
|
||||
#define kMaxBufSize 16384
|
||||
#define kIndexVersion 0x00000001
|
||||
#define kBuildIndexStartDelay 10000 // in milliseconds
|
||||
#define kUpdateIndexStartDelay 10000 // in milliseconds
|
||||
#define kUpdateIndexStartDelay 50000 // in milliseconds
|
||||
|
||||
const char kIndexName[] = "index";
|
||||
const char kTempIndexName[] = "index.tmp";
|
||||
@ -2651,6 +2650,9 @@ CacheIndex::StartUpdatingIndex(bool aRebuild)
|
||||
|
||||
uint32_t elapsed = (TimeStamp::NowLoRes() - mStartTime).ToMilliseconds();
|
||||
if (elapsed < kUpdateIndexStartDelay) {
|
||||
LOG(("CacheIndex::StartUpdatingIndex() - %u ms elapsed since startup, "
|
||||
"scheduling timer to fire in %u ms.", elapsed,
|
||||
kUpdateIndexStartDelay - elapsed));
|
||||
rv = ScheduleUpdateTimer(kUpdateIndexStartDelay - elapsed);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
return;
|
||||
@ -2658,6 +2660,9 @@ CacheIndex::StartUpdatingIndex(bool aRebuild)
|
||||
|
||||
LOG(("CacheIndex::StartUpdatingIndex() - ScheduleUpdateTimer() failed. "
|
||||
"Starting update immediately."));
|
||||
} else {
|
||||
LOG(("CacheIndex::StartUpdatingIndex() - %u ms elapsed since startup, "
|
||||
"starting update now.", elapsed));
|
||||
}
|
||||
|
||||
nsRefPtr<CacheIOThread> ioThread = CacheFileIOManager::IOThread();
|
||||
|
Loading…
Reference in New Issue
Block a user