Community
Participate
Working Groups
org.eclipse.swt.ole.win32.OleAutomation: In all constructors objIDispatch.GetTypeInfo is called unnecessary .(objITypeInfo is only accessed in methods getHelpFile, getDocumentation, getPropertyDescription, getFunctionDescription, getTypeInfoAttributes and getNames which are all hardly ever used by SWT itself) e.g.: OleAutomation(IDispatch idispatch) { if (idispatch == null) OLE.error(OLE.ERROR_INVALID_INTERFACE_ADDRESS); objIDispatch = idispatch; objIDispatch.AddRef(); int /*long*/[] ppv = new int /*long*/[1]; /* GetTypeInfo([in] iTInfo, [in] lcid, [out] ppTInfo) * AddRef has already been called on ppTInfo by the callee and must be released by the caller. */ int result = objIDispatch.GetTypeInfo(0, COM.LOCALE_USER_DEFAULT, ppv); if (result == OLE.S_OK) { objITypeInfo = new ITypeInfo(ppv[0]); } } In some cases, e.g. if calling Variant.getAutomation (which constructs a new OleAutomation instance) to an object representing an IE 9 document mode's IHTMLElement the call to GetTypeInfo costs more than one millisecond (intel i5) which causes a huge performance impact when dealing with many objects. Solution/Workaround: Don't call GetTypeInfo in constructory but evaluate and store it when it's needed.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.