[PR #1507] [MERGED] feat(langgraph): speed up prepareSingleTask by 20x #1504

Closed
opened 2026-02-15 20:16:01 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraphjs/pull/1507
Author: @dqbd
Created: 8/7/2025
Status: Merged
Merged: 8/7/2025
Merged by: @dqbd

Base: mainHead: dqbd/perf-core-tick-loop


📝 Commits (2)

  • a116961 feat(langgraph): speed up prepareSingleTask by 20x
  • 0058fb9 Add changeset

📊 Changes

3 files changed (+23 additions, -15 deletions)

View changed files

.changeset/cute-results-repair.md (+5 -0)
📝 libs/langgraph/src/pregel/algo.ts (+2 -5)
📝 libs/langgraph/src/pregel/utils/index.ts (+16 -10)

📄 Description

  • Avoid calling channel.get() when only checking for availability
  • Avoid enumerating all channels just to obtain a null channel version
  • Short-circuit to a well-known channel when obtaining channel version

Cuts down the sequential_1000 benchmark from 32s down to 1.32s.


🔄 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/pull/1507 **Author:** [@dqbd](https://github.com/dqbd) **Created:** 8/7/2025 **Status:** ✅ Merged **Merged:** 8/7/2025 **Merged by:** [@dqbd](https://github.com/dqbd) **Base:** `main` ← **Head:** `dqbd/perf-core-tick-loop` --- ### 📝 Commits (2) - [`a116961`](https://github.com/langchain-ai/langgraphjs/commit/a116961a0d9d86174ed83027c9b69b64ba5f74b2) feat(langgraph): speed up prepareSingleTask by 20x - [`0058fb9`](https://github.com/langchain-ai/langgraphjs/commit/0058fb947faac760850f1b8f49c9212323fb4d15) Add changeset ### 📊 Changes **3 files changed** (+23 additions, -15 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/cute-results-repair.md` (+5 -0) 📝 `libs/langgraph/src/pregel/algo.ts` (+2 -5) 📝 `libs/langgraph/src/pregel/utils/index.ts` (+16 -10) </details> ### 📄 Description - Avoid calling `channel.get()` when only checking for availability - Avoid enumerating all channels just to obtain a null channel version - Short-circuit to a well-known channel when obtaining channel version Cuts down the `sequential_1000` benchmark from 32s down to 1.32s. --- <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-15 20:16:01 -05:00
yindo closed this issue 2026-02-15 20:16:01 -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#1504