[PR #1683] [MERGED] Performance improvements in core library #2226

Closed
opened 2026-02-20 17:46:35 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraph/pull/1683
Author: @nfcampos
Created: 9/11/2024
Status: Merged
Merged: 9/12/2024
Merged by: @nfcampos

Base: mainHead: nc/11sep/perf


📝 Commits (10+)

📊 Changes

10 files changed (+257 additions, -85 deletions)

View changed files

📝 .github/workflows/_integration_test.yml (+1 -1)
📝 .github/workflows/_lint.yml (+1 -1)
📝 .github/workflows/bench.yml (+36 -8)
📝 libs/langgraph/langgraph/pregel/__init__.py (+4 -5)
📝 libs/langgraph/langgraph/pregel/algo.py (+17 -14)
📝 libs/langgraph/langgraph/pregel/io.py (+4 -1)
📝 libs/langgraph/langgraph/pregel/loop.py (+6 -1)
📝 libs/langgraph/langgraph/pregel/read.py (+20 -10)
📝 libs/langgraph/langgraph/utils/config.py (+153 -28)
📝 libs/langgraph/langgraph/utils/runnable.py (+15 -16)

📄 Description

  • Avoid creating new callback manager when received one as arg
  • Avoid looking for config when already received one as arg
  • Avoid copies of values in ensure_config/merge_configs
  • Implement version of ensure_config that accepts multiple configs (avoids calling merge_configs first)
  • Avoid calling merge_configs when we only need to attach extra tags/metadata

🔄 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/langgraph/pull/1683 **Author:** [@nfcampos](https://github.com/nfcampos) **Created:** 9/11/2024 **Status:** ✅ Merged **Merged:** 9/12/2024 **Merged by:** [@nfcampos](https://github.com/nfcampos) **Base:** `main` ← **Head:** `nc/11sep/perf` --- ### 📝 Commits (10+) - [`5d2a7fa`](https://github.com/langchain-ai/langgraph/commit/5d2a7fa8fc75fb1ba3d833bb48d1fff98f616f53) Performance improvements in core library - [`2ddcce5`](https://github.com/langchain-ai/langgraph/commit/2ddcce576499bec8c8958570132b54ae734b325d) Fix - [`7e321e5`](https://github.com/langchain-ai/langgraph/commit/7e321e5a0194b64a715067e1173d8d20c7142ede) Fix - [`8283dc2`](https://github.com/langchain-ai/langgraph/commit/8283dc248f6c95976b819d4a8bd65bf03c190d60) Try again - [`049a1ad`](https://github.com/langchain-ai/langgraph/commit/049a1ad40931df8734184fefe3bcbb5dd77b2500) Debug ci job - [`9d9ad7b`](https://github.com/langchain-ai/langgraph/commit/9d9ad7b3c8fce5997903434591ebcef776ca8fd5) Fix - [`a23d3eb`](https://github.com/langchain-ai/langgraph/commit/a23d3eb3acf1f533b40e95dec8bcae49e698c5b3) Try again - [`e43d93b`](https://github.com/langchain-ai/langgraph/commit/e43d93bc273d9dd221533ed53be28a17c9feaaff) Try again - [`85431d0`](https://github.com/langchain-ai/langgraph/commit/85431d0a00d8fc095146d3346de14fd5281317c1) Try again - [`bdaebe4`](https://github.com/langchain-ai/langgraph/commit/bdaebe4bf84272f2e8826c581d20f05612495cb5) Some more variations ### 📊 Changes **10 files changed** (+257 additions, -85 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/_integration_test.yml` (+1 -1) 📝 `.github/workflows/_lint.yml` (+1 -1) 📝 `.github/workflows/bench.yml` (+36 -8) 📝 `libs/langgraph/langgraph/pregel/__init__.py` (+4 -5) 📝 `libs/langgraph/langgraph/pregel/algo.py` (+17 -14) 📝 `libs/langgraph/langgraph/pregel/io.py` (+4 -1) 📝 `libs/langgraph/langgraph/pregel/loop.py` (+6 -1) 📝 `libs/langgraph/langgraph/pregel/read.py` (+20 -10) 📝 `libs/langgraph/langgraph/utils/config.py` (+153 -28) 📝 `libs/langgraph/langgraph/utils/runnable.py` (+15 -16) </details> ### 📄 Description - Avoid creating new callback manager when received one as arg - Avoid looking for config when already received one as arg - Avoid copies of values in ensure_config/merge_configs - Implement version of ensure_config that accepts multiple configs (avoids calling merge_configs first) - Avoid calling merge_configs when we only need to attach extra tags/metadata --- <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-20 17:46:35 -05:00
yindo closed this issue 2026-02-20 17:46:35 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#2226