Title: Performance [P2]: Avoid eager worker imports from Azure managed package · Issue #196 · microsoft/durabletask-python · GitHub
Open Graph Title: Performance [P2]: Avoid eager worker imports from Azure managed package · Issue #196 · microsoft/durabletask-python
X Title: Performance [P2]: Avoid eager worker imports from Azure managed package · Issue #196 · microsoft/durabletask-python
Description: What is the issue? Importing the Azure managed package eagerly imports the full core worker implementation just to re-export worker-related types. What is the impact? Client-only Azure managed applications pay to import gRPC, protobuf, e...
Open Graph Description: What is the issue? Importing the Azure managed package eagerly imports the full core worker implementation just to re-export worker-related types. What is the impact? Client-only Azure managed appl...
X Description: What is the issue? Importing the Azure managed package eagerly imports the full core worker implementation just to re-export worker-related types. What is the impact? Client-only Azure managed appl...
Opengraph URL: https://github.com/microsoft/durabletask-python/issues/196
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Performance [P2]: Avoid eager worker imports from Azure managed package","articleBody":"### What is the issue?\r\n\r\nImporting the Azure managed package eagerly imports the full core worker implementation just to re-export worker-related types.\r\n\r\n### What is the impact?\r\n\r\nClient-only Azure managed applications pay to import gRPC, protobuf, entities, serialization, and worker code during Python process startup. This can materially increase cold-start latency in serverless and short-lived processes.\r\n\r\n### Details about the issue including code reference\r\n\r\nRelevant code:\r\n\r\nhttps://github.com/microsoft/durabletask-python/blob/55d8e0b413eb5dd75afa64f30c54fe300bf4ea21/durabletask/__init__.py#L6-L15\r\n\r\nThe shared `durabletask` package initializer imports `GrpcChannelOptions`, payload-store types, and several symbols from `durabletask.worker`. Because the Azure managed package lives under the same `durabletask` namespace, importing anything from it (for example `durabletask.azuremanaged.client`) first initializes `durabletask/__init__.py` and therefore loads the entire worker dependency graph, even when an application only needs a scheduler client.\r\n\r\n### A potential or proposed solution\r\n\r\nMove lightweight shared types into a smaller module, or use lazy module exports through module `__getattr__` with `TYPE_CHECKING` imports. Preserve current public import paths, especially `from durabletask import ConcurrencyOptions` and the other re-exported symbols, and keep `__all__` intact so `dir()` and star-imports behave as before.\r\n","author":{"url":"https://github.com/berndverst","@type":"Person","name":"berndverst"},"datePublished":"2026-07-24T21:20:55Z","url":"https://github.com/microsoft/durabletask-python/issues/196"}
| 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:a6bae273-4897-6c48-97c9-83e62b402876 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9CDE:352B6A:43B47:5AB75:6AFE413C |
| html-safe-nonce | 67ee291a0d69a15d0ebebf7cb7764e7c1bddb53d6cce6553109d39c68b1272fc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Q0RFOjM1MkI2QTo0M0I0Nzo1QUI3NTo2QUZFNDEzQyIsInZpc2l0b3JfaWQiOiIyMzA4MzI5NjY4MjI0MTA2ODEyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 95b03c50c766830ad1ab25c45d89800913dc7e845fb54bb09472e072714979d4 |
| hovercard-subject-tag | issue:4972159399 |
| 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/196/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b154d9aa73537a9e32174113e48680971ed3c7913f5ecb4088804395269cdc66/microsoft/durabletask-python/issues/196 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b154d9aa73537a9e32174113e48680971ed3c7913f5ecb4088804395269cdc66/microsoft/durabletask-python/issues/196 |
| og:image:alt | What is the issue? Importing the Azure managed package eagerly imports the full core worker implementation just to re-export worker-related types. What is the impact? Client-only Azure managed appl... |
| 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 | c4447fdce9ed0f33af959d2b6680d0bc18212a6a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width