mhammond / pywin32

Python for Windows (pywin32) Extensions
5.06k stars 798 forks source link

Minor Client Speedup #775

Open ghost opened 20 years ago

ghost commented 20 years ago

In CDispatch._ApplyTypes_ (win32com.client.dispatch) i get a small (but worthwhile) speed improvement if I replace (during lots of ADO recordset operations):

result = self._oleobj_.InvokeTypes(*(dispid, LCID, wFlags, retType, argTypes) + args)

With:

result = self._oleobj_.InvokeTypes(dispid, LCID, wFlags, retType, argTypes, *args)

I think they are functionally equivalent.

Sorry I haven't worked out how to create this as a patch.

Cheers, Giles

Reported by: gilesbrown

Original Ticket: "pywin32/feature-requests/16":https://sourceforge.net/p/pywin32/feature-requests/16

Avasam commented 7 months ago

These improvements would be caught automatically by Ruff's collection-literal-concatenation (RUF005)