Title: Performance [P2]: Cache type-discovery signature structure · Issue #189 · microsoft/durabletask-python · GitHub
Open Graph Title: Performance [P2]: Cache type-discovery signature structure · Issue #189 · microsoft/durabletask-python
X Title: Performance [P2]: Cache type-discovery signature structure · Issue #189 · microsoft/durabletask-python
Description: What is the issue? Type discovery caches resolved type hints but still performs callable signature inspection and positional parameter filtering on every handler invocation. What is the impact? Small, high-frequency activities, entity op...
Open Graph Description: What is the issue? Type discovery caches resolved type hints but still performs callable signature inspection and positional parameter filtering on every handler invocation. What is the impact? Sma...
X Description: What is the issue? Type discovery caches resolved type hints but still performs callable signature inspection and positional parameter filtering on every handler invocation. What is the impact? Sma...
Opengraph URL: https://github.com/microsoft/durabletask-python/issues/189
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Performance [P2]: Cache type-discovery signature structure","articleBody":"### What is the issue?\n\nType discovery caches resolved type hints but still performs callable signature inspection and positional parameter filtering on every handler invocation.\n\n### What is the impact?\n\nSmall, high-frequency activities, entity operations, and orchestration replays repeatedly pay reflection costs that can become measurable CPU overhead at high throughput.\n\n### Details about the issue including code reference\n\nRelevant code:\n\nhttps://github.com/microsoft/durabletask-python/blob/55d8e0b413eb5dd75afa64f30c54fe300bf4ea21/durabletask/internal/type_discovery.py#L44-L91\n\nhttps://github.com/microsoft/durabletask-python/blob/55d8e0b413eb5dd75afa64f30c54fe300bf4ea21/durabletask/internal/type_discovery.py#L106-L150\n\nhttps://github.com/microsoft/durabletask-python/blob/55d8e0b413eb5dd75afa64f30c54fe300bf4ea21/durabletask/worker.py#L3083-L3090\n\n`_resolved_hints()` is cached, but `_input_annotation()` and `activity_output_type()` still call `inspect.signature()` and inspect parameters. Worker execution invokes these helpers for activity execution, entity operations, and orchestration replay.\n\n### A potential or proposed solution\n\nCache callable signature structure and resolved raw annotations in a bounded cache. Continue to apply `DataConverter.can_reconstruct()` at call time so converter-specific or stateful behavior remains correct. Preserve the existing conservative fallback to raw payloads when annotation resolution fails.","author":{"url":"https://github.com/berndverst","@type":"Person","name":"berndverst"},"datePublished":"2026-07-24T20:50:21Z","url":"https://github.com/microsoft/durabletask-python/issues/189"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3a0b6fb2-e99e-004c-224b-7571d974e906 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CFA4:D184:3A85A3:4EE152:6AFE413D |
| html-safe-nonce | f6b095df4b22b2047ac5fc7fb5b0d29e0bab7497194f62ab2c8df7f9926d176d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRkE0OkQxODQ6M0E4NUEzOjRFRTE1Mjo2QUZFNDEzRCIsInZpc2l0b3JfaWQiOiI3NjEzMTY5OTI2MjY4Njg1NDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1eb37f8c8c2c1d3829cea3205f83b8a464bf22e13dcc8783cab20850974a5c53 |
| hovercard-subject-tag | issue:4971936631 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/durabletask-python/189/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a8d3d3fcf75d5d1a12c77bf36951fe3e6c2b08507e0edd60f8a544fbef239a09/microsoft/durabletask-python/issues/189 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a8d3d3fcf75d5d1a12c77bf36951fe3e6c2b08507e0edd60f8a544fbef239a09/microsoft/durabletask-python/issues/189 |
| og:image:alt | What is the issue? Type discovery caches resolved type hints but still performs callable signature inspection and positional parameter filtering on every handler invocation. What is the impact? Sma... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | berndverst |
| hostname | github.com |
| expected-hostname | github.com |
| None | f1a5901e2377b0af2a0b303f9528678f1475d04b9219dca1e993344196eaa07c |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/durabletask-python git https://github.com/microsoft/durabletask-python.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 627664515 |
| octolytics-dimension-repository_nwo | microsoft/durabletask-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627664515 |
| octolytics-dimension-repository_network_root_nwo | microsoft/durabletask-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ce393ea11ad276623b946bc9663d3e7d6f564275 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width