[PR #74] [MERGED] fix(api): reuse ts.Program as much as possible #70

Closed
opened 2026-02-16 04:17:13 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraphjs-api/pull/74
Author: @dqbd
Created: 5/16/2025
Status: Merged
Merged: 5/16/2025
Merged by: @dqbd

Base: mainHead: dqbd/schema-inference-parallel


📝 Commits (1)

  • ef51697 fix(api): reuse ts.Program as much as possible

📊 Changes

4 files changed (+729 additions, -563 deletions)

View changed files

📝 libs/langgraph-api/src/graph/parser/index.mts (+64 -27)
📝 libs/langgraph-api/src/graph/parser/parser.mts (+121 -55)
📝 libs/langgraph-api/src/graph/parser/parser.worker.mjs (+1 -5)
📝 libs/langgraph-api/tests/parser.test.mts (+543 -476)

📄 Description

Previously we spawned a JS worker for every graph, which means that the TS typechecker relaunched multiple times, which most likely is the cause of OOM issues seen in LGP


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/langgraphjs-api/pull/74 **Author:** [@dqbd](https://github.com/dqbd) **Created:** 5/16/2025 **Status:** ✅ Merged **Merged:** 5/16/2025 **Merged by:** [@dqbd](https://github.com/dqbd) **Base:** `main` ← **Head:** `dqbd/schema-inference-parallel` --- ### 📝 Commits (1) - [`ef51697`](https://github.com/langchain-ai/langgraphjs-api/commit/ef5169744e2ea534f5c07c5feefc62d0bb872a29) fix(api): reuse ts.Program as much as possible ### 📊 Changes **4 files changed** (+729 additions, -563 deletions) <details> <summary>View changed files</summary> 📝 `libs/langgraph-api/src/graph/parser/index.mts` (+64 -27) 📝 `libs/langgraph-api/src/graph/parser/parser.mts` (+121 -55) 📝 `libs/langgraph-api/src/graph/parser/parser.worker.mjs` (+1 -5) 📝 `libs/langgraph-api/tests/parser.test.mts` (+543 -476) </details> ### 📄 Description Previously we spawned a JS worker for every graph, which means that the TS typechecker relaunched multiple times, which most likely is the cause of OOM issues seen in LGP --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 04:17:13 -05:00
yindo closed this issue 2026-02-16 04:17:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs-api#70