gecko-dev/dom
Gerald Squelart 9e967498fe Bug 1368837 - MediaResourceIndex::ReadAt tries to cache last-read block - r=cpearce
This is the core of this bug:
- We try to read past the end of the requested range, and save a block-full of
cached data. ("Block" is a memory range, with an alignment and size being a
power of two, to match existing caching happening in MediaCache and
FileBlockCache, and to play nice with the memory allocator.)
- If part of a requested read touches the existing cache, we can just read from
the cache, which means we don't involve any of the locking and IOs that normal
reads use.

The small extra work needed to cache more data in some reads is largely offset
by all the lock&IO-heavy reads that we can subsequently avoid.

UncachedReadAt, which is used internally by CachedReadAt, is left public
because it could be useful if the caller knows for sure that a particular read
is isolated.

(Note: The printfs, and comparison code in ReadAt, will be removed in later
patches. Also the block size will be later controlled by a pref.)

MozReview-Commit-ID: GFiaP5Io7Hf

--HG--
extra : rebase_source : 2bebcdb7854989b55f2026e92338a00ac29a5376
2017-05-30 14:59:30 +12:00
..
animation Bug 1365674 - stylo: Simulate compute value failure for dom/animation mochitests. r=hiro 2017-05-30 10:24:08 +02:00
asmjscache Bug 1343396 - Split CycledCollectedJSContext and XPCJSContext into separate context and runtime classes (r=mccr8) 2017-04-18 17:01:04 -07:00
audiochannel Bug 1367075 - Get rid of AudioChannelService::IsParentProcess, r=me - CLOSED TREE 2017-05-24 09:49:35 +02:00
base Merge inbound to m-c. a=merge 2017-05-31 20:25:52 -04:00
battery
bindings Bug 1352968 part 1 - Add separate CSSImportRule base class. r=heycam 2017-05-30 11:10:25 +10:00
broadcastchannel Bug 1359718 - Get rid of PBlob - part 2 - PBlob, r=smaug, r=kanru 2017-05-23 18:05:19 +02:00
browser-element Bug 1368712 - Get rid of nsIBrowserElementAPI.{set,get}Visible, r=kanru 2017-05-31 21:15:23 +02:00
cache Bug 1368106 - Use the new MOZ_DIAGNOSTIC_ASSERT_ENABLED instead of several defines r=glandium 2017-05-26 18:53:35 +02:00
canvas Merge m-c to inbound. a=merge 2017-05-25 16:35:51 -04:00
commandhandler Bug 1361745 - Part 2: Avoid a double hashtable lookup for insertions in nsControllerCommandGroup::AddCommandToGroup; r=mystor 2017-05-08 10:02:04 -04:00
console Bug 1363307 - Console.timeEnd(label) should warn if 'label' in an unknwon timer, r=bgrins 2017-05-11 14:36:12 -07:00
crypto Bug 1363560 - Name more runnables (r=mccr8) 2017-05-09 21:53:25 -07:00
encoding Bug 1351548 - Remove reftest-stylo.lists. r=bholley 2017-04-28 11:15:58 +08:00
events Bug 1367683 Optimize initializing nsRange r=smaug 2017-05-30 13:18:25 +09:00
fetch Bug 1312515 - Part 2: Lower the channel's priority if this Fetch is created from tracking script. r=baku 2017-05-19 01:29:00 -04:00
file Bug 1359718 - Get rid of PBlob - part 5 - Fixing #includes, r=smaug 2017-05-23 18:06:52 +02:00
filehandle Bug 1359490 - add an event loop spinning abstraction function; r=gerald 2017-05-15 09:34:19 -04:00
filesystem Bug 1361511 - change ownership assertion mechanism for various DOM classes; r=baku 2017-05-03 11:48:54 -04:00
flyweb Bug 1326154 - Fix to prevent FlyWebService from pointing to a URL with a different origin. r=djvj 2017-05-23 15:17:02 -04:00
gamepad Bug 1362284 - Assign the background thread before flushing pending events at GamepadEventChannelParent; r=Lenzak 2017-05-05 01:21:39 +08:00
geolocation Bug 1357323 - Remove support for gonk in the build system. r=gps 2017-04-18 16:56:09 +09:00
grid
html Bug 1368712 - Get rid of nsIBrowserElementAPI.{set,get}Visible, r=kanru 2017-05-31 21:15:23 +02:00
imptests Bug 1361645 - Change reftest condition stylo to styloVsGecko r=dbaron 2017-05-25 11:26:12 +08:00
indexedDB Bug 1368041 - Enable no-array-constructor across mozilla-central r=standard8 2017-05-27 15:17:29 +01:00
interfaces Backed out 2 changesets (bug 1347270) for browser_toolbariconcolor_restyles.js permafail on a CLOSED TREE. 2017-05-30 18:11:02 -04:00
ipc Merge m-c to autoland. a=merge 2017-05-31 20:50:21 -04:00
json Bug 1343933 - Renaming Principal classes - part 2 - NullPrincipal, r=qdot 2017-03-22 11:38:40 +01:00
jsurl Bug 1363560 - Name more runnables (r=mccr8) 2017-05-09 21:53:25 -07:00
locales Bug 1368583 - Adjust MediaEMENoCodecsDeprecatedWarning string to make it clearer. r=flod 2017-06-01 08:12:24 +12:00
manifest Bug 1362993 - Rewrite gBrowser.addTab() to use BrowserTestUtils.addTab(). r=florian 2017-05-15 21:49:50 +02:00
mathml Bug 1359556 - Optimize cloneNode by preinitializing attribute and child arrays r=bz 2017-04-20 12:57:48 -07:00
media Bug 1368837 - MediaResourceIndex::ReadAt tries to cache last-read block - r=cpearce 2017-05-30 14:59:30 +12:00
messagechannel Bug 1359718 - Get rid of PBlob - part 2 - PBlob, r=smaug, r=kanru 2017-05-23 18:05:19 +02:00
network Bug 1359005 - Cleanup the use of PBlob in StructuredCloneHolder - part 1 - protocols, r=smaug 2017-05-23 07:49:40 +02:00
notification Bug 1351034 - Remove WEB_NOTIFICATION_PERMISSION_REMOVED. f=chutten; r=kitcambridge 2017-05-09 09:24:01 -07:00
offline Bug 1316683 - Part 5: Avoid going into SpiderMonkey for retrieving origin attributes; r=baku 2017-04-12 11:32:19 -04:00
payments Backed out changeset 437d6df1859c (bug 1345361) for ESLint failures. 2017-05-25 18:05:15 -04:00
performance Bug 1123754 (part 1) - Rename ProfilerMarkers.{h,cpp} as ProfilerMarkerPayload.{h,cpp}. r=mstange. 2017-04-27 07:36:19 +10:00
permission
plugins Bug 1330185 - Use a top-level PProfiler protocol to control the profiler in other processes. r=billm,njn 2017-05-30 15:06:14 -04:00
power Bug 1362993 - Rewrite gBrowser.addTab() to use BrowserTestUtils.addTab(). r=florian 2017-05-15 21:49:50 +02:00
presentation Bug 1367150 - Do not attempt to create PresentationChild if ContentChild is shutting down. r=ehsan 2017-05-25 06:43:59 -04:00
promise Bug 1358879 - Optimize handling of internally-created Promise objects. r=bz 2017-05-03 12:46:00 +02:00
push Bug 1345665 - Implement the "aes128gcm" push decryption scheme. r=mt 2017-05-11 22:03:26 -07:00
quota Bug 1362993 - Rewrite gBrowser.addTab() to use BrowserTestUtils.addTab(). r=florian 2017-05-15 21:49:50 +02:00
res
script Bug 1364117 - Encode JS bytecode of scripts which are parsed on the main thread. r=mrbkap 2017-05-29 16:01:37 +00:00
secureelement Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
security Bug 1363634 - rewrite test_style_crossdomain.html. r=ckerschb 2017-05-23 09:02:06 +08:00
smil Bug 1363880 - Enable crashtest for SVG that no longer cause panic. r=birtles 2017-05-17 05:50:58 +09:00
storage Bug 1366101 - Remove extra warnings in SessionStorageManage, r=smaug 2017-05-19 17:26:42 +02:00
svg Bug 1240275 - Support SVG 2 radialGradient fr attribute. r=cam r=peterv (see comment 16) 2017-05-23 07:15:02 +01:00
system Bug 1363966 - Cleanup network geo provider: removed unneeded listener function wrapper and the call to non-existent listener.locationUpdatePending(). r=jdm 2017-05-24 07:22:00 -04:00
tests Bug 1355675 Part 4: Add tests of Element::getTransformTo... methods. r=mattwoodrow 2017-05-25 16:01:06 -07:00
time
u2f
url Bug 1368955 - Split URL.cpp in URLMainThread.{cpp,h} and URLWorker.{cpp,h}, r=qdot 2017-05-31 21:18:56 +02:00
vr Bug 1362213 - Implement chrome-only API to manage VR sessions r=daoshengmu,kanru,smaug 2017-05-08 16:01:36 -07:00
webauthn Bug 1364991 - Make U2FTokenManager use const where possible r=qdot 2017-05-22 16:40:29 -07:00
webbrowserpersist Bug 1352958 - Use UNIFIED_SOURCES into dom/webbrowserpersist. r=overholt 2017-05-17 18:19:53 +09:00
webidl Merge inbound to m-c. a=merge 2017-05-31 20:25:52 -04:00
workers Bug 1366501 - disable test_subworkers_suspended.html for android, r=gbrown 2017-05-30 16:27:12 +02:00
worklet Bug 1362119 - part 1 - Moving dom/base/Script{Loader,Element}.* in dom/script, r=ehsan 2017-05-08 08:24:22 +02:00
xbl Bug 1367286 - Remove loading user html binding via "dom.userHTMLBindings.uri". r=bz 2017-05-24 13:10:12 -04:00
xhr Bug 1367110 - Expose XHRMT's ErrorCode to chrome JS. r=baku 2017-05-24 08:52:15 -04:00
xml Bug 1365506 - fix XHTML/XUL tests that use data: URI. r=smaug 2017-05-23 09:02:06 +08:00
xslt Bug 1362119 - part 1 - Moving dom/base/Script{Loader,Element}.* in dom/script, r=ehsan 2017-05-08 08:24:22 +02:00
xul Bug 1363640 Part 5 - Add a table in nsXULPrototypeCache to cache XBL documents with servo backend. r=bz,heycam 2017-05-19 15:18:00 -07:00
jar.mn
moz.build Backed out changeset 437d6df1859c (bug 1345361) for ESLint failures. 2017-05-25 18:05:15 -04:00