Closed Bug 1384914 Opened 9 years ago Closed 9 years ago

Use an integral enumeration instead of UUIDs as interface identifiers for queryInterface

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1384727

People

(Reporter: benjamin, Unassigned)

Details

nsISupports::QueryInterface has forever used UUIDs as the interface identifiers for QueryInterface. This is necessary for binary compatibility, but has rather poor performance. Now that in 57 we know all the XPCOM interfaces at compile-time, we have the possibility of using a compile-time enumeration instead of interface IDs. To the extent that queryinterface is showing up in any profiles (and it does, see bug 1384798), this could have significant performance benefits: * avoid memory indirection of IIDs * do single-word comparisons for improved pipelining * really efficient generated switch statements * efficient vectorized lookups I haven't taken the time to break this down into separate bugs, but here is what I think this would entail: * build work to generate the interface list enumeration from all the XPIDL files compiled in the tree * final binary separation of nsISupports and IUnknown in accessibility-land, if that's not already done * changes to the macro-based QI implementations (table and codegen) * API updates to xpconnect Components. * random treewide fixup I really doubt we should do this for 57 for a bunch of risk reasons, but 58 or beyond...
Ehsan filed this 18 hours ago.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.