Closed Bug 1414497 Opened 8 years ago Closed 8 years ago

[e10s a11y] Reduce cross-process QueryInterface using IMultiQI

Categories

(Core :: Disability Access APIs, enhancement, P2)

All
Windows
enhancement

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox57 --- wontfix
firefox58 --- fix-optional

People

(Reporter: Jamie, Assigned: Jamie)

References

Details

Attachments

(3 files)

Now that virtual buffers have to render across processes, we want to eliminate as many cross-process calls as possible. This includes QueryInterface calls, since buffers query for several interfaces on every node they visit. One way we can do this is tweaking the handler to use IMultiQI, an interface implemented by COM which allows a caller to query for multiple interfaces in a single cross-process call: https://msdn.microsoft.com/en-us/library/windows/desktop/ms683863(v=vs.85).aspx Note that this still requires us to make one extra cross-process call after we receive the initial interface. Ideally, we would eliminate even this and instead include the interface pointers in the handler payload. Unfortunately, this is proving to be rather tricky to implement. We should still pursue this in future, but this first pass with IMultiQI should at least allow us to determine whether reducing these calls makes much difference.
Try build: https://tools.taskcluster.net/groups/bFHTg0vwSROhqojcaEjrrg/tasks/VwHKA60JTVCha83ttYLOJw/runs/0/artifacts Marco, it'd be great if you could give this a try and see if you notice any performance difference. Surprisingly, I wasn't seeing any notable difference with local builds, which just doesn't make any theoretical sense to me. (Sorry about the previous try build on IRC; bad rebase. :) )
Assignee: nobody → jteh
Depends on: 1414118
Here's another try build with some further fixes (though I'm still not sure whether there's a perf improvement when testing local builds): https://treeherder.mozilla.org/#/jobs?repo=try&revision=63d405c76754d02cf79d6723ce031ade86cbf53c
Aaron, a couple of questions related to this: 1. I need to track E_NOINTERFACE results from QueryMultipleInterfaces, since some timing tests revealed that COM caches interfaces but does *not* cache E_NOINTERFACE results. I tried using an nsTArray, but the build fails when I do that because nsTArray.cpp isn't included in the handler anywhere. I wasn't sure what the implications of trying to use that in a non-Mozilla process were, so I used an std::vector. Is that going to be a problem, and if so, what would you recommend? 2. If QueryHandlerInterface returns E_NOINTERFACE, Handler::InternalQueryInterface falls back to querying the proxy. That normally makes perfect sense, but in this case, I know that the proxy doesn't have the interface and I don't want it wasting a cross-proc call. I thought I could invent a custom HRESULT (HANDLER_E_NOINTERFACE_CACHED?) for this purpose, which InternalQI would catch and immediately return E_NOINTERFACE. Do you have any better ideas?
Flags: needinfo?(aklotz)
Jamie, the latest try build is about a second faster on my machine than regular nightly, e. g. under 7 seconds for World War I instead of 8. Note, however, that I am not using an NVDA build yet with the IaccessibleHypertext2 stuff with multiple hyperlinks. But anyway, this seems to make things more fluid yet again.
I thought it might be useful to see where I'm going with this. However, part 3 is definitely not the final patch. (Unfortunately, it doesn't seem you can do a feedback request with mozreview instead of a review request.) Right now, it just returns E_FAIL instead of E_NOINTERFACE in the cached E_NOINTERFACE case. See comment 3 for questions about this.
Closing in favour of bug 1416986, since that approach is now working and provides even better performance.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Attachment #8925926 - Flags: review?(aklotz)
Attachment #8925927 - Flags: review?(aklotz)
Attachment #8925928 - Flags: review?(aklotz)
Flags: needinfo?(aklotz)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: