Title: Slow table parsing for huge tables · Issue #1516 · python-openxml/python-docx · GitHub
Open Graph Title: Slow table parsing for huge tables · Issue #1516 · python-openxml/python-docx
X Title: Slow table parsing for huge tables · Issue #1516 · python-openxml/python-docx
Description: `from docx.table import _Cell, Table from docx.oxml.table import CT_Tbl elif isinstance(child, CT_Tbl): # table -> JSON # DEBUG table_obj = Table(child, parent) list_table = [[k.text for k in j.cells] for j in table_obj.rows] str_table =...
Open Graph Description: `from docx.table import _Cell, Table from docx.oxml.table import CT_Tbl elif isinstance(child, CT_Tbl): # table -> JSON # DEBUG table_obj = Table(child, parent) list_table = [[k.text for k in j.cel...
X Description: `from docx.table import _Cell, Table from docx.oxml.table import CT_Tbl elif isinstance(child, CT_Tbl): # table -> JSON # DEBUG table_obj = Table(child, parent) list_table = [[k.text for k in j....
Opengraph URL: https://github.com/python-openxml/python-docx/issues/1516
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Slow table parsing for huge tables","articleBody":"`from docx.table import _Cell, Table\nfrom docx.oxml.table import CT_Tbl \n\n\nelif isinstance(child, CT_Tbl):\n # table -\u003e JSON\n # DEBUG\n table_obj = Table(child, parent)\n list_table = [[k.text for k in j.cells] for j in table_obj.rows]\n str_table = self.list_to_md_table(list_table)\n yield str_table`\n\nThis is my current code reads Word tables and converts them to JSON, but performance degrades significantly when handling large tables — for example, a 9000-row × 10-column table takes too long to parse.\n\nIs there a way to optimize or accelerate this process? Any suggestions for improving efficiency would be greatly appreciated! ","author":{"url":"https://github.com/Trace2333","@type":"Person","name":"Trace2333"},"datePublished":"2025-09-08T07:51:19.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1516/python-docx/issues/1516"}
| 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:4b948e8c-cfd0-e696-5931-c11776dfdc5f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C000:27B1FA:15BC636:1CAA88A:696B7E34 |
| html-safe-nonce | 808ed609b9db223ac6aed3d520b115a60a46db68f78cc4d6365d4b27b96167b5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDAwOjI3QjFGQToxNUJDNjM2OjFDQUE4OEE6Njk2QjdFMzQiLCJ2aXNpdG9yX2lkIjoiMTA3ODI5NDM2MjI1MzM5MzQ2MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a82479811a2c835bb38a85660f8935863d73f33219712f24f5890b2b7bb841c2 |
| hovercard-subject-tag | issue:3393041358 |
| 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/python-openxml/python-docx/1516/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6e233dd1fc876e2e340f4da6e22dc8e56522682f0279ec87cc4615c5073f54ea/python-openxml/python-docx/issues/1516 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6e233dd1fc876e2e340f4da6e22dc8e56522682f0279ec87cc4615c5073f54ea/python-openxml/python-docx/issues/1516 |
| og:image:alt | `from docx.table import _Cell, Table from docx.oxml.table import CT_Tbl elif isinstance(child, CT_Tbl): # table -> JSON # DEBUG table_obj = Table(child, parent) list_table = [[k.text for k in j.cel... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Trace2333 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/python-openxml/python-docx git https://github.com/python-openxml/python-docx.git |
| octolytics-dimension-user_id | 3403760 |
| octolytics-dimension-user_login | python-openxml |
| octolytics-dimension-repository_id | 13592924 |
| octolytics-dimension-repository_nwo | python-openxml/python-docx |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 13592924 |
| octolytics-dimension-repository_network_root_nwo | python-openxml/python-docx |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width