mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Bug 494322. nsMediaCache verification code is super slow in debug builds, so turn it off during seeking so we don't get O(N^2) slowdowns. r=doublec
--HG-- extra : rebase_source : a088ef84206eeb7e6e77d42fecb1bbd8f0721c60
This commit is contained in:
parent
373b3baa8d
commit
c41a58c04d
@ -79,6 +79,11 @@ static const PRUint32 FREE_BLOCK_SCAN_LIMIT = 16;
|
||||
using mozilla::TimeStamp;
|
||||
using mozilla::TimeDuration;
|
||||
|
||||
#ifdef DEBUG
|
||||
// Turn this on to do very expensive cache state validation
|
||||
// #define DEBUG_VERIFY_CACHE
|
||||
#endif
|
||||
|
||||
class nsMediaCache {
|
||||
public:
|
||||
friend class nsMediaCacheStream::BlockList;
|
||||
@ -167,7 +172,7 @@ public:
|
||||
// -- seek channels that need to seek to a new location
|
||||
void Update();
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_VERIFY_CACHE
|
||||
// Verify invariants, especially block list invariants
|
||||
void Verify();
|
||||
#else
|
||||
@ -1095,7 +1100,7 @@ nsMediaCache::QueueUpdate()
|
||||
NS_DispatchToMainThread(event);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_VERIFY_CACHE
|
||||
void
|
||||
nsMediaCache::Verify()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user