Title: Performance issues related to complete_value on large datasets · Issue #189 · graphql-python/graphql-core · GitHub
Open Graph Title: Performance issues related to complete_value on large datasets · Issue #189 · graphql-python/graphql-core
X Title: Performance issues related to complete_value on large datasets · Issue #189 · graphql-python/graphql-core
Description: Hi! We've noticed that returning a list of 5k elements, with a couple of nested objects is pretty slow: Person { id name lastname age address {street number} job {id org_name} partner {id name} pets {name type} school {id name} } ncalls ...
Open Graph Description: Hi! We've noticed that returning a list of 5k elements, with a couple of nested objects is pretty slow: Person { id name lastname age address {street number} job {id org_name} partner {id name} pet...
X Description: Hi! We've noticed that returning a list of 5k elements, with a couple of nested objects is pretty slow: Person { id name lastname age address {street number} job {id org_name} partner {id name}...
Opengraph URL: https://github.com/graphql-python/graphql-core/issues/189
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Performance issues related to complete_value on large datasets","articleBody":"Hi! We've noticed that returning a list of 5k elements, with a couple of nested objects is pretty slow:\r\n\r\n```\r\nPerson {\r\n id\r\n name\r\n lastname\r\n age\r\n address {street number}\r\n job {id org_name}\r\n partner {id name}\r\n pets {name type}\r\n school {id name}\r\n}\r\n```\r\n\r\n\r\n\r\n\r\n\u003cdiv dir=\"ltr\" style=\"margin-left:0pt;\" align=\"left\" id=\"docs-internal-guid-cb368ed0-7fff-816b-121a-afa47f4689ff\">\r\n\r\nncalls | tottime | percall | cumtime | percall | filename:lineno(function)\r\n-- | -- | -- | -- | -- | --\r\n1 | 1.8e-05 | 1.8e-05 | 2.145 | 2.145 | graphql.py:103(graphql_sync)\r\n1 | 1.5e-05 | 1.5e-05 | 2.145 | 2.145 | graphql.py:152(graphql_impl)\r\n1/30001 | 0.19 | 6.335e-06 | 2.137 | 7.122e-05 | execute.py:413(ExecutionContext.execute_fields)\r\n1 | 1.3e-05 | 1.3e-05 | 2.137 | 2.137 | execute.py:965(execute)\r\n1 | 7e-06 | 7e-06 | 2.137 | 2.137 | execute.py:328(ExecutionContext.execute_operation)\r\n1/135001 | 0.3229 | 2.392e-06 | 2.135 | 1.581e-05 | execute.py:485(ExecutionContext.execute_field)\r\n1/145001 | 0.2737 | 1.888e-06 | 2.071 | 1.428e-05 | execute.py:575(ExecutionContext.complete_value)\r\n1 | 0.009884 | 0.009884 | 2.071 | 2.071 | execute.py:660(ExecutionContext.complete_list_value)\r\n**5000/30000** | 0.02747 | 9.156e-07 | 2.026 | 6.752e-05 | execute.py:893(ExecutionContext.complete_object_value)\r\n\r\n\u003c/div>\r\n\r\nBy itself it's not really a slow function, but its executed 30k times. Is there any way to reduce the overhead by reducing the number of times this function is invoked?\r\n\r\nTested on Python 3.8 and graphql-core==3.2.3","author":{"url":"https://github.com/JCatrielLopez","@type":"Person","name":"JCatrielLopez"},"datePublished":"2023-01-11T19:01:33Z","url":"https://github.com/graphql-python/graphql-core/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:b6f283e3-0b9f-76f4-c4cb-a7f6f2cf64ec |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D114:3B10DD:355B9B:44FC2D:6AFFC7B6 |
| html-safe-nonce | 73c87b685fc5f0013fd3e808e8b2747d61d93b4aba0e2847495acd069f0e23f5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTE0OjNCMTBERDozNTVCOUI6NDRGQzJEOjZBRkZDN0I2IiwidmlzaXRvcl9pZCI6Ijc5OTQ3NjExMjg1NDQ1NTI4ODYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d5b1aed31bba9be27004c2c4100376022d09310eaad4128493ae3e985656e035 |
| hovercard-subject-tag | issue:1529531169 |
| 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/graphql-python/graphql-core/189/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a45544dbb57a18b9b72a30b3cd36d0b10c86d0fb9a22ab51643bdd4d9ad79272/graphql-python/graphql-core/issues/189 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a45544dbb57a18b9b72a30b3cd36d0b10c86d0fb9a22ab51643bdd4d9ad79272/graphql-python/graphql-core/issues/189 |
| og:image:alt | Hi! We've noticed that returning a list of 5k elements, with a couple of nested objects is pretty slow: Person { id name lastname age address {street number} job {id org_name} partner {id name} pet... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JCatrielLopez |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1e805b832df235bb21305db712c3b6432920019dfc12cb25b9cb8d3b0c9403cf |
| turbo-cache-control | no-preview |
| go-import | github.com/graphql-python/graphql-core git https://github.com/graphql-python/graphql-core.git |
| octolytics-dimension-user_id | 15002022 |
| octolytics-dimension-user_login | graphql-python |
| octolytics-dimension-repository_id | 143207933 |
| octolytics-dimension-repository_nwo | graphql-python/graphql-core |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 143207933 |
| octolytics-dimension-repository_network_root_nwo | graphql-python/graphql-core |
| 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 | 8fa4a54e6871c7908eda1c246ad5972982c0b59d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width