Commit Graph
521 Commits
Author SHA1 Message Date
Andrew McCreight 4f90901e23 Bug 1363544 - Call into nsXPConnect directly in the loader and XPCShellImpl. r=mrbkap
MozReview-Commit-ID: 7ZnHdAG1Jmk
2017-05-09 14:08:15 -07:00
Kris Maglione b6a58b1b7e Bug 1361900: Part 11 - Make sure new cache file is closed before renaming on Windows. r=me
MozReview-Commit-ID: KpJpId6eULt
2017-05-13 22:55:34 -07:00
Kris Maglione a2c34c33d2 Bug 1361900: Part 10 - Replace linked lists with a single hashtable. r=erahm
MozReview-Commit-ID: 3qXnswsP6Z0
2017-05-13 22:43:08 -07:00
Kris Maglione 74171bab99 Bug 1361900: Part 9 - Sort scripts by initial load time before saving. r=erahm
MozReview-Commit-ID: 54UN2DVK4xM
2017-05-13 14:08:42 -07:00
Kris Maglione 2cd3833299 Bug 1361900: Part 7 - Use the script preloader in content processes in subscript and component loaders. r=mccr8
MozReview-Commit-ID: 4b5XwORYlAz
2017-04-30 21:53:49 -07:00
Kris Maglione 9b1f5930f3 Bug 1361900: Part 6 - Add content process support for the script preloader. r=erahm,gabor
MozReview-Commit-ID: 6hDQAI52bKC
2017-05-02 17:17:52 -07:00
Kris Maglione b21f65e20f Bug 1361900: Part 5 - Add support for IPC FileDescriptors to AutoMemMap. r=erahm
MozReview-Commit-ID: 3HBuKLVNdWT
2017-04-30 22:54:00 -07:00
Kris Maglione 97dff8870c Bug 1361900: Part 4 - Use a separate script cache for scripts loaded in the child process. r=erahm,gabor
MozReview-Commit-ID: EIdwmuTOl90
2017-05-09 19:52:17 -07:00
Kris Maglione ec666f90cf Bug 1361900: Part 3 - Add a helper script to decode and inspect script cache data. r=erahm
MozReview-Commit-ID: DOj7X46NaZ5
2017-04-30 13:00:55 -07:00
Kris Maglione 3a4147c0fb Bug 1361900: Part 2 - Add process types field to cached script data. r=erahm
MozReview-Commit-ID: Gvh672XD0ar
2017-05-03 17:21:31 -07:00
Sebastian Hengst e04a511297 Backed out changeset 39ffa8a7801a (bug 1361900) 2017-05-13 18:53:50 +02:00
Sebastian Hengst 0b25c5d332 Backed out changeset bd55bd27bb1e (bug 1361900) 2017-05-13 18:53:45 +02:00
Sebastian Hengst 21c66afcab Backed out changeset ad243db647c7 (bug 1361900) 2017-05-13 18:53:40 +02:00
Sebastian Hengst a35d2a356c Backed out changeset 540ecb4c1f0f (bug 1361900) 2017-05-13 18:53:35 +02:00
Sebastian Hengst a3b74893c8 Backed out changeset 4227bcda00ba (bug 1361900) 2017-05-13 18:53:30 +02:00
Sebastian Hengst 63dda6594f Backed out changeset 3c716b3b4541 (bug 1361900) 2017-05-13 18:53:25 +02:00
Sebastian Hengst b9af39bbfa Backed out changeset 2a48f8b743d1 (bug 1361900) 2017-05-13 18:53:15 +02:00
Sebastian Hengst 47a0097791 Backed out changeset 75b28187fa5e (bug 1361900) 2017-05-13 18:53:10 +02:00
Sebastian Hengst f749a91a17 Backed out changeset 9795dacd97e1 (bug 1361900) 2017-05-13 18:52:53 +02:00
Sebastian Hengst 3523d40ed1 Backed out changeset 8d47499f43b3 (bug 1361900) 2017-05-13 18:52:48 +02:00
Sebastian Hengst 1411620009 Backed out changeset 0b38ac21c7a5 (bug 1361900) 2017-05-13 18:52:25 +02:00
Sebastian Hengst 0545c7ee8d Backed out changeset 23dc7b443bb0 (bug 1361900) 2017-05-13 18:51:57 +02:00
Kris Maglione 5ed1d1edcb Bug 1361900: Fix one last merge botch, and fix a false rooting hazard warning.
MozReview-Commit-ID: JpKYYEBpbQj
2017-05-12 18:14:12 -07:00
Kris Maglione 15e363d2b3 Bug 1361900: Follow-up: Fix order of execution issue. r=me
MozReview-Commit-ID: DcmTlzxskUj
2017-05-12 15:46:34 -07:00
Kris Maglione 91de2fdcf8 Bug 1361900: Follow-up: Fix another rebase botch. r=me
MozReview-Commit-ID: BuvkimQCRDP
2017-05-12 15:17:25 -07:00
Kris Maglione 8127d85928 Bug 1361900: Follow-up: Fix rebase botch. r=me
MozReview-Commit-ID: 3KIbvGYhnlG
2017-05-12 14:59:34 -07:00
Kris Maglione c9956d2c0a Bug 1361900: Part 10 - Replace linked lists with a single hashtable. r=erahm
MozReview-Commit-ID: 3qXnswsP6Z0
2017-05-03 16:57:31 -07:00
Kris Maglione df8e7cf669 Bug 1361900: Part 9 - Sort scripts by initial load time before saving. r=erahm
MozReview-Commit-ID: 54UN2DVK4xM
2017-05-01 14:12:01 -07:00
Kris Maglione cf37efb8b1 Bug 1361900: Part 7 - Use the script preloader in content processes in subscript and component loaders. r=mccr8
MozReview-Commit-ID: 4b5XwORYlAz
2017-04-30 21:53:49 -07:00
Kris Maglione 50a722a8d7 Bug 1361900: Part 6 - Add content process support for the script preloader. r=erahm,gabor
MozReview-Commit-ID: 6hDQAI52bKC
2017-05-02 17:17:52 -07:00
Kris Maglione dd7886e9d0 Bug 1361900: Part 5 - Add support for IPC FileDescriptors to AutoMemMap. r=erahm
MozReview-Commit-ID: 3HBuKLVNdWT
2017-04-30 22:54:00 -07:00
Kris Maglione 12df64d482 Bug 1361900: Part 4 - Use a separate script cache for scripts loaded in the child process. r=erahm,gabor
MozReview-Commit-ID: EIdwmuTOl90
2017-05-09 19:52:17 -07:00
Kris Maglione ba10b25699 Bug 1361900: Part 3 - Add a helper script to decode and inspect script cache data. r=erahm
MozReview-Commit-ID: DOj7X46NaZ5
2017-04-30 13:00:55 -07:00
Kris Maglione 94d84195be Bug 1361900: Part 2 - Add process types field to cached script data. r=erahm
MozReview-Commit-ID: Gvh672XD0ar
2017-05-03 17:21:31 -07:00
Andrea Marchesini 80bc31371c Bug 1362119 - part 1 - Moving dom/base/Script{Loader,Element}.* in dom/script, r=ehsan
This patch does these things:

1. it moves nsScriptElement, nsScriptLoader, ScriptSettings, nsIScriptElement
   and nsIScriptLoaderObserver in dom/script
2. it renames nsScriptElement to mozilla::dom::ScriptElement
3. it renames nsScriptLaoder to mozilla::dom::ScriptLoader
2017-05-08 08:24:22 +02:00
Carsten "Tomcat" Book c4daf63d34 Backed out changeset 5d77f6b14633 (bug 1362119) for android bustage in nsCCUncollectableMarker.cpp:500:7: error: 'TraceScriptHolder' is not a member of 'mozilla' 2017-05-08 09:54:38 +02:00
Andrea Marchesini 71aba8e0ee Bug 1362119 - part 1 - Moving dom/base/Script{Loader,Element}.* in dom/script, r=ehsan
This patch does these things:

1. it moves nsScriptElement, nsScriptLoader, ScriptSettings, nsIScriptElement
   and nsIScriptLoaderObserver in dom/script
2. it renames nsScriptElement to mozilla::dom::ScriptElement
3. it renames nsScriptLaoder to mozilla::dom::ScriptLoader
2017-05-08 08:24:22 +02:00
Kris Maglione 5395bd04d5 Bug 1359653: Follow-up: Don't cache mochikit scripts as a temporary bustage workaround.
MozReview-Commit-ID: I4FcZWRKlWr
2017-05-06 14:41:22 -07:00
Kris Maglione dd0b06b87f Bug 1359653: Part 9 - Observe "startupcache-invalidate" and flush the cache when received. r=erahm
Flushing the cache at startup is already handled automatically by the
AppStartup code, which removes the entire startupCache directory when
necessary. The add-on manager requires being able to flush the cache at
runtime, though, for the sake of updating bootstrapped add-ons.

MozReview-Commit-ID: LIdiNHrXYXu
2017-05-03 12:31:51 -07:00
Kris Maglione 906b4d1986 Bug 1359653: Part 6 - Use the script precompiler in the JS component loader and subscript loader. r=mccr8,shu
MozReview-Commit-ID: HMl0xbAARHK
2017-05-03 22:06:33 -07:00
Kris Maglione cc1348b222 Bug 1359653: Part 5 - Pre-load scripts needed during startup in a background thread. r=shu,erahm
One of the things that I've noticed in profiling startup overhead is that,
even with the startup cache, we spend about 130ms just loading and decoding
scripts from the startup cache on my machine.

I think we should be able to do better than that by doing some of that work in
the background for scripts that we know we'll need during startup. With this
change, we seem to consistently save about 3-5% on non-e10s startup overhead
on talos. But there's a lot of room for tuning, and I think we get some
considerable improvement with a few ongoing tweeks.

Some notes about the approach:

- Setting up the off-thread compile is fairly expensive, since we need to
create a global object, and a lot of its built-in prototype objects for each
compile. So in order for there to be a performance improvement for OMT
compiles, the script has to be pretty large. Right now, the tipping point
seems to be about 20K.

  There's currently no easy way to improve the per-compile setup overhead, but
we should be able to combine the off-thread compiles for multiple smaller
scripts into a single operation without any additional per-script overhead.

- The time we spend setting up scripts for OMT compile is almost entirely
CPU-bound. That means that we have a chunk of about 20-50ms where we can
safely schedule thread-safe IO work during early startup, so if we schedule
some of our current synchronous IO operations on background threads during the
script cache setup, we basically get them for free, and can probably increase
the number of scripts we compile in the background.

- I went with an uncompressed mmap of the raw XDR data for a storage format.
That currently occupies about 5MB of disk space. Gzipped, it's ~1.2MB, so
compressing it might save some startup disk IO, but keeping it uncompressed
simplifies a lot of the OMT and even main thread decoding process, but, more
importantly:

- We currently don't use the startup cache in content processes, for a variety
of reasons. However, with this approach, I think we can safely store the
cached script data from a content process before we load any untrusted code
into it, and then share mmapped startup cache data between all content
processes. That should speed up content process startup *a lot*, and very
likely save memory, too. And:

- If we're especially concerned about saving per-process memory, and we keep
the cache data mapped for the lifetime of the JS runtime, I think that with
some effort we can probably share the static string data from scripts between
content processes, without any copying. Right now, it looks like for the main
process, there's about 1.5MB of string-ish data in the XDR dumps. It's
probably less for content processes, but if we could save .5MB per process
this way, it might make it easier to increase the number of content processes
we allow.

MozReview-Commit-ID: CVJahyNktKB
2017-05-06 12:24:22 -07:00
Sebastian Hengst 393e7b6bbc Backed out changeset 1c7df9455059 (bug 1359653) 2017-05-06 11:02:23 +02:00
Sebastian Hengst cd9951aeaf Backed out changeset a505dcbe8a02 (bug 1359653) 2017-05-06 11:02:18 +02:00
Sebastian Hengst 53028b71e4 Backed out changeset 8f4637881ddc (bug 1359653) 2017-05-06 11:02:04 +02:00
Kris Maglione 881111c21d Bug 1359653: Part 9 - Observe "startupcache-invalidate" and flush the cache when received. r=erahm
Flushing the cache at startup is already handled automatically by the
AppStartup code, which removes the entire startupCache directory when
necessary. The add-on manager requires being able to flush the cache at
runtime, though, for the sake of updating bootstrapped add-ons.

MozReview-Commit-ID: LIdiNHrXYXu
2017-05-03 12:31:51 -07:00
Kris Maglione cf95f450b3 Bug 1359653: Part 6 - Use the script precompiler in the JS component loader and subscript loader. r=mccr8,shu
MozReview-Commit-ID: HMl0xbAARHK
2017-05-03 22:06:33 -07:00
Kris Maglione ab738f1b0b Bug 1359653: Part 5 - Pre-load scripts needed during startup in a background thread. r=shu,erahm
One of the things that I've noticed in profiling startup overhead is that,
even with the startup cache, we spend about 130ms just loading and decoding
scripts from the startup cache on my machine.

I think we should be able to do better than that by doing some of that work in
the background for scripts that we know we'll need during startup. With this
change, we seem to consistently save about 3-5% on non-e10s startup overhead
on talos. But there's a lot of room for tuning, and I think we get some
considerable improvement with a few ongoing tweeks.

Some notes about the approach:

- Setting up the off-thread compile is fairly expensive, since we need to
create a global object, and a lot of its built-in prototype objects for each
compile. So in order for there to be a performance improvement for OMT
compiles, the script has to be pretty large. Right now, the tipping point
seems to be about 20K.

  There's currently no easy way to improve the per-compile setup overhead, but
we should be able to combine the off-thread compiles for multiple smaller
scripts into a single operation without any additional per-script overhead.

- The time we spend setting up scripts for OMT compile is almost entirely
CPU-bound. That means that we have a chunk of about 20-50ms where we can
safely schedule thread-safe IO work during early startup, so if we schedule
some of our current synchronous IO operations on background threads during the
script cache setup, we basically get them for free, and can probably increase
the number of scripts we compile in the background.

- I went with an uncompressed mmap of the raw XDR data for a storage format.
That currently occupies about 5MB of disk space. Gzipped, it's ~1.2MB, so
compressing it might save some startup disk IO, but keeping it uncompressed
simplifies a lot of the OMT and even main thread decoding process, but, more
importantly:

- We currently don't use the startup cache in content processes, for a variety
of reasons. However, with this approach, I think we can safely store the
cached script data from a content process before we load any untrusted code
into it, and then share mmapped startup cache data between all content
processes. That should speed up content process startup *a lot*, and very
likely save memory, too. And:

- If we're especially concerned about saving per-process memory, and we keep
the cache data mapped for the lifetime of the JS runtime, I think that with
some effort we can probably share the static string data from scripts between
content processes, without any copying. Right now, it looks like for the main
process, there's about 1.5MB of string-ish data in the XDR dumps. It's
probably less for content processes, but if we could save .5MB per process
this way, it might make it easier to increase the number of content processes
we allow.

MozReview-Commit-ID: CVJahyNktKB
2017-05-05 16:15:04 -07:00
Andrew Swan 40619f69de Bug 1354682 Add transform to XPCOMUtils.defineLazyPreferenceGetter r=kmag
MozReview-Commit-ID: Lm59IHMNcy9
2017-04-28 22:39:13 -07:00
Phil Ringnalda 602322539a Backed out 3 changesets (bug 1354682) for sessionstore browser-chrome bustage
CLOSED TREE

Backed out changeset 55405fd328f9 (bug 1354682)
Backed out changeset 56b8122e64a3 (bug 1354682)
Backed out changeset 9374009a95e5 (bug 1354682)

MozReview-Commit-ID: BNVhwID8NwD
2017-04-28 20:24:34 -07:00
Andrew Swan 88b2e5e245 Bug 1354682 Add transform to XPCOMUtils.defineLazyPreferenceGetter r=kmag
MozReview-Commit-ID: Lm59IHMNcy9
2017-04-28 16:10:44 -07:00