Open Bug 759040 Opened 13 years ago Updated 6 months ago

In nsHttpChannel, call mCacheAsyncFunc directly from ReadFromCache instead of dispatching an asynchronous event

Categories

(Core :: Networking: HTTP, defect, P5)

defect

Tracking

()

People

(Reporter: briansmith, Unassigned)

Details

(Keywords: perf, Whiteboard: [necko-backlog])

AFAICT, we should be able to call mCacheAsyncFunc directly, instead of calling it through AsyncCall(mCacheAsyncFunc), at least in most situations. This should speed things up by avoiding the need to wait for the main thread event queue to be cleared before calling mCacheAsyncFunc.
OS: Windows 7 → All
Hardware: x86_64 → All
Whiteboard: [necko-backlog]
Priority: -- → P1
Priority: P1 → P3

Bulk-downgrade of unassigned, >=3 years untouched DOM/Storage bug's priority.

If you have reason to believe this is wrong, please write a comment and ni :jstutte.

Severity: normal → S4
Priority: P3 → P5

https://searchfox.org/firefox-main/rev/d0ff31da7cb418d2d86b0d83fecd7114395e5d46/netwerk/protocol/http/nsHttpChannel.cpp#5536-5550

  // TODO: Bug 759040 - We should call HandleAsyncRedirect directly here,
  // to avoid event dispatching latency.
  MOZ_ASSERT(!mCacheInputStream);
  LOG(("Skipping skip read of cached redirect entity\n"));
  return AsyncCall(&nsHttpChannel::HandleAsyncRedirect);
}

if ((mLoadFlags & LOAD_ONLY_IF_MODIFIED) && !LoadCachedContentIsPartial()) {
  LOG(
      ("Skipping read from cache based on LOAD_ONLY_IF_MODIFIED "
       "load flag\n"));
  MOZ_ASSERT(!mCacheInputStream);
  // TODO: Bug 759040 - We should call HandleAsyncNotModified directly
  // here, to avoid event dispatching latency.
  return AsyncCall(&nsHttpChannel::HandleAsyncNotModified);
You need to log in before you can comment on or make changes to this bug.