Title: Materializes all rows as Python proto objects — high memory usage at scale · Issue #6160 · feast-dev/feast · GitHub
Open Graph Title: Materializes all rows as Python proto objects — high memory usage at scale · Issue #6160 · feast-dev/feast
X Title: Materializes all rows as Python proto objects — high memory usage at scale · Issue #6160 · feast-dev/feast
Description: Is your feature request related to a problem? Please describe. When materializing features to an online store via LocalOutputNode, the current implementation converts the entire Arrow Table into a Python list of ValueProto objects before...
Open Graph Description: Is your feature request related to a problem? Please describe. When materializing features to an online store via LocalOutputNode, the current implementation converts the entire Arrow Table into a ...
X Description: Is your feature request related to a problem? Please describe. When materializing features to an online store via LocalOutputNode, the current implementation converts the entire Arrow Table into a ...
Opengraph URL: https://github.com/feast-dev/feast/issues/6160
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Materializes all rows as Python proto objects — high memory usage at scale","articleBody":"**Is your feature request related to a problem? Please describe.**\nWhen materializing features to an online store via LocalOutputNode, the current implementation converts the entire Arrow Table into a Python list of ValueProto objects before any writing occurs. At hundreds of thousands of rows, this causes severe memory pressure and can OOM in practice.\n\n**Root Cause**\n\nThe call chain in [`LocalOutputNode.execute()`](sdk/python/feast/infra/compute_engines/local/nodes.py#L369):\n\n```python\nrows_to_write = _convert_arrow_to_proto(\n input_table, self.feature_view, join_key_to_value_type\n)\nonline_store.online_write_batch(..., data=rows_to_write, ...)\n```\n\n`_convert_arrow_to_proto` ([utils.py:325](sdk/python/feast/utils.py#L325)) performs three full-data copies sequentially:\n\n1. **Arrow → NumPy** (`to_numpy(zero_copy_only=False)`) — necessary to bridge Arrow nulls to Python type system\n2. **NumPy → `List[ValueProto]`** — each scalar becomes an independent Python protobuf heap object (~200 bytes overhead per value vs 4–8 bytes raw)\n3. **Column-wise → row-wise** (`list(zip(...))`) — full materialization into a Python list\n\n\n**Describe the solution you'd like**\n\n**Chunk iteration in `LocalOutputNode` (minimal, low-risk):**\n\n```python\nBATCH_SIZE = 10_000\nfor batch in input_table.to_batches(max_chunksize=BATCH_SIZE):\n rows_to_write = _convert_arrow_to_proto(\n batch, self.feature_view, join_key_to_value_type\n )\n online_store.online_write_batch(\n config=context.repo_config,\n table=self.feature_view,\n data=rows_to_write,\n progress=lambda x: None,\n )\n # rows_to_write eligible for GC after each iteration\n```\n\n**Describe alternatives you've considered**\nA clear and concise description of any alternative solutions or features you've considered.\n\n**Additional context**\nAdd any other context or screenshots about the feature request here.\n","author":{"url":"https://github.com/cutoutsy","@type":"Person","name":"cutoutsy"},"datePublished":"2026-03-26T12:39:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/6160/feast/issues/6160"}
| 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:57aded3a-9953-9936-7ce2-750565c0a902 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CD0C:8EB96:84BEB0:C0F90E:6A4E1325 |
| html-safe-nonce | 33898b2fe4db79c0b75f3a2cef583260c1760431a52187f6a567829df2f20d94 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDBDOjhFQjk2Ojg0QkVCMDpDMEY5MEU6NkE0RTEzMjUiLCJ2aXNpdG9yX2lkIjoiNDYyNDc5OTkyNTQ2MDE0NDkzMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | caf58b7add0b4407dc91b2f86d890bf298371de4f392b528be650ffa7b900152 |
| hovercard-subject-tag | issue:4143532600 |
| 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/feast-dev/feast/6160/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e52f2b3dba1b68cca66fec0c3b0dd8df6d4226fe85ebc5d3ee5a527623050318/feast-dev/feast/issues/6160 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e52f2b3dba1b68cca66fec0c3b0dd8df6d4226fe85ebc5d3ee5a527623050318/feast-dev/feast/issues/6160 |
| og:image:alt | Is your feature request related to a problem? Please describe. When materializing features to an online store via LocalOutputNode, the current implementation converts the entire Arrow Table into a ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cutoutsy |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/feast-dev/feast git https://github.com/feast-dev/feast.git |
| octolytics-dimension-user_id | 57027613 |
| octolytics-dimension-user_login | feast-dev |
| octolytics-dimension-repository_id | 161133770 |
| octolytics-dimension-repository_nwo | feast-dev/feast |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 161133770 |
| octolytics-dimension-repository_network_root_nwo | feast-dev/feast |
| 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 | ea9187571e3edc5f2780f750631138669441ca50 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width