You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hot code path in internalization checks to see if update.updateFromExternalObject wants a "dataserver" keyword or a "context" or nothing. This has a few problems:
Checking the argspec is insanely slow. In one test, it was 5.28us, vs checking an isinstance which clocked in at around 200ns. That's 26x slower. (I was able to get rid of argspec there, but I don't know if I can do that here while preserving compatibility.)
A dataserver argument doesn't make any sense.
There's a fallback path that passes nothing if we can't be exactly sure what the signature is.
This all needs to be simplified, starting with dropping the dataserver argument, and then maybe requiring everyone to accept a context argument.
The text was updated successfully, but these errors were encountered:
We can cache this information based on the type of the object. We could then issue warnings for each broken type (where broken means 'needing dataserver or 'not accepting context'). This is similar to what we do for __ext_ignore_toExternalObject__.
Note that the main datastructures, compiled with cython, do not work with inspect at all, currently. (But see the mailing list discussion about PEP580.)
The hot code path in internalization checks to see if
update.updateFromExternalObject
wants a "dataserver" keyword or a "context" or nothing. This has a few problems:isinstance
which clocked in at around 200ns. That's 26x slower. (I was able to get rid of argspec there, but I don't know if I can do that here while preserving compatibility.)This all needs to be simplified, starting with dropping the
dataserver
argument, and then maybe requiring everyone to accept acontext
argument.The text was updated successfully, but these errors were encountered: