Closed Bug 822833 Opened 12 years ago Closed 8 years ago

AppCache does blocking disk I/O on the mainthread

Categories

(Core :: Networking: Cache, defect, P2)

defect

Tracking

()

RESOLVED WONTFIX
blocking-b2g -
blocking-basecamp -
Tracking Status
b2g18 - ---

People

(Reporter: philikon, Unassigned)

References

Details

(Keywords: perf, Whiteboard: [c= p= s= u=] [tech-bug])

Updating a hosted app via app cache can massively degrade B2G's performance. The big offender is nsOfflineCacheDevice, in particular nsOfflineCacheDevice::UpdateEntrySize() [1] which is executed several times per downloaded file and each time performs blocking disk I/O on the mainthread.

See bug 813765 for an extensive discussion.

[1] https://mxr.mozilla.org/mozilla-central/source/netwerk/cache/nsDiskCacheDeviceSQL.cpp#979
Blocks: 813765
blocking-basecamp: --- → ?
This sucks, but fixing this is simply too big of a change too late in the game. We've always known that the appcache is sucky performance-wise, and while that sucks, trying to fix this will be too high risk.

We need to find workarounds or simply live with poor performance.
I will work on this in Q1/2013.
Tracking nomination mainly cause we'll want to eventually fix this, even if it's not for v1.
tracking-b2g18: --- → ?
Tracking based on v1-next performance target.
Jonas, is the level of change too take on the 1.x branch even? Or push to 2.0? Or forget it in favor of appcache-successor?
Whiteboard: [ffos_perf]
blocking-b2g: --- → -
I think focusing on the appcache successor is likely better use of our time. Even if we fixed the performance problems in our current implementation, people would still not want to use it given how bad the spec is.
(In reply to Jonas Sicking (:sicking) from comment #6)
> I think focusing on the appcache successor is likely better use of our time.
> Even if we fixed the performance problems in our current implementation,
> people would still not want to use it given how bad the spec is.

Yes, but the current B2G as well as we can predict a first official release is about to use the current appcache spec and our implementation.

It is considered a serious perf issue.

I will spend some little time to just look if a quick solution would be avail.
If you can find a simple-ish way to significantly reduce the amount of sync IO blocking on the main thread, then I definitely think that that would be worth taking.
(One of those sources of jank we don't like to discuss.)
Blocks: b2g-v-next
One of the things we don't like to talk about.
Whiteboard: [ffos_perf] → [ffos_perf][tech-bug]
Even if there is a successor, I'll guess a substantial amount will still use the old one (at least short- to mid-term). Thus this should be fixed anyway. 

And if not v1, then please try to land this in v1.x.
Keywords: perf
Whiteboard: [ffos_perf][tech-bug] → [ffos_perf][tech-bug] c=
Severity: normal → critical
Whiteboard: [ffos_perf][tech-bug] c= → [c= p= s= u=] [tech-bug]
(In reply to Jonas Sicking (:sicking) from comment #6)
> I think focusing on the appcache successor is likely better use of our time.
> Even if we fixed the performance problems in our current implementation,
> people would still not want to use it given how bad the spec is.

Jonas, can you find the bug # for appcache successor that you are referring to?
Flags: needinfo?(jonas)
Priority: -- → P2
The successor API is ServiceWorkers, and bug 982725 tracks the Cache sub-API in particular.
Flags: needinfo?(jonas)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.