| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…ALLBACK Skip _get_xidata() for types not in the XIData registry when using the FULL_FALLBACK path in _PyObject_GetXIData(). This avoids creating and discarding a NotShareableError exception on every successful pickle fallback transfer. Registered types (None, bool, int, float, str, bytes, tuple) still follow the existing path unchanged. On total failure, the same NotShareableError is raised as before.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Avoid unnecessary NotShareableError creation in _PyObject_GetXIData() on the FULL_FALLBACK path.
For types not present in the XIData registry, the previous code always called _get_xidata(), which raised NotShareableError before falling back to function/pickle handling. When pickle fallback succeeded, that exception was immediately discarded. This change adds a registry pre-check so unregistered types can skip _get_xidata() and go straight to the fallback path.
Follow-up to gh-148072 / GH-148125 (pickle cache).
Changes
Behavior
This is intended as a performance-only change.
Benchmarks
Baseline is upstream/main (after GH-148125). identity(x) round-trip, max_workers=1, Apple M2.
Test plan