On Thu, Mar 31, 2016 at 3:19 AM, Honza Bambas <hbam...@mozilla.com> wrote:
> On 3/30/2016 20:21, Kyle Huey wrote: > >> In the department-of-paying-down-technical-debt, I'm planning to remove >> much of the Chromium event loop over the next few months. You can follow >> along in bug 1260828. >> >> The rough outline: >> >> Step 1: Replace Task with nsIRunnable, without changing any other >> semantics. This will happen in late April, after Gecko 48 branches. >> Step 2: Either remove PostDelayedTask, or reimplement its semantics in >> nsThread. >> Step 3: Remove Chromium event loops using TYPE_DEFAULT and >> TYPE_MOZILLA_NONMAINTHREAD. These are the simplest cases, because >> TYPE_DEFAULT runs a Chromium Tasks only event loop, and >> TYPE_MOZILLA_NONMAINTHREAD just glues delayed and idle tasks into the >> normal XPCOM event loop. >> Step 4: Tackle TYPE_MOZILLA_PARENT and TYPE_MOZILLA_CHILD. These run the >> main threads of parent and content processes respectively, and aren't much >> harder than step 3. >> >> The other types (TYPE_UI, TYPE_IO, and TYPE_MOZILLA_NONMAINUITHREAD) >> involve varying levels of platform specific event loop or API integration >> that will probably be more difficult to untangle. They also won't block my >> long-term desire to build a scheduler for Gecko, so are lower priority. >> >> If you have objections, speak now or forever hold your peace. >> > > Few questions: > > - how will this impact the IPC pumping that is based on Tasks? > It will be changed to not use Tasks. > - do you have more details/ideas/bugs about your scheduler? I may have > similar thoughts, like adding priorities to (not only) main thread events. > Backtrack (bug 1148204) should give hints (at least) how such a scheduler > should behave and check if does what we want. > At a very high level, there will be an event queue per global and we'll prioritize the queues for things in the foreground. There are also opportunities to prioritize within a given queue, according to the HTML spec, but it's not clear how much of that is web compatible. - Kyle _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform