chore(langchain): Refactor the string concatenation to use the more efficient .join() m…#32915
chore(langchain): Refactor the string concatenation to use the more efficient .join() m…#32915 湛露先生 (zhanluxianshen) wants to merge 1 commit intolangchain-ai:masterfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
CodSpeed WallTime Performance ReportMerging #32915 will degrade performances by 16.1%Comparing
|
| Benchmark | BASE |
HEAD |
Change | |
|---|---|---|---|---|
| ❌ | test_import_time[CallbackManager] |
446.4 ms | 525 ms | -14.98% |
| ❌ | test_import_time[HumanMessage] |
211.3 ms | 244.2 ms | -13.46% |
| ❌ | test_import_time[InMemoryRateLimiter] |
164.9 ms | 183.6 ms | -10.2% |
| ❌ | test_import_time[InMemoryVectorStore] |
613.4 ms | 717.8 ms | -14.54% |
| ❌ | test_import_time[LangChainTracer] |
425.3 ms | 493.7 ms | -13.84% |
| ❌ | test_import_time[PydanticOutputParser] |
544.4 ms | 637.1 ms | -14.55% |
| ❌ | test_import_time[RunnableLambda] |
476.7 ms | 539.8 ms | -11.69% |
| ❌ | test_import_time[Runnable] |
477.9 ms | 567.7 ms | -15.81% |
| ❌ | test_import_time[tool] |
508.3 ms | 605.9 ms | -16.1% |
CodSpeed Instrumentation Performance ReportMerging #32915 will not alter performanceComparing Summary
|
…ethod. Signed-off-by: zhanluxianshen <zhanluxianshen@163.com>
08cc337 to
649af3e
Compare
Eugene Yurtsev (eyurtsev)
left a comment
There was a problem hiding this comment.
湛露先生 (@zhanluxianshen) thanks for taking the time to make a contribution. For optimizations we would generally want to see evidence that things make a difference. In this case, this optimization does not make any meaningful difference so we won't accept it.
I would suggest taking the patch and some of this information and discussing with chat gpt or claude and getting some critique in terms of what optimizations are meaningful or not :)
Refactor the string concatenation to use the more efficient .join() method.
Thank you for contributing to LangChain! Follow these steps to mark your pull request as ready for review. If any of these steps are not completed, your PR will not be considered for review.
PR title: Follows the format: {TYPE}({SCOPE}): {DESCRIPTION}
{TYPE}values:{SCOPE}values (optional):{DESCRIPTION}must not start with an uppercase letter.PR message: Delete this entire checklist and replace with
Add tests and docs: If you're adding a new integration, you must include:
docs/docs/integrationsdirectory.Lint and test: Run
make format,make lintandmake testfrom the root of the package(s) you've modified. We will not consider a PR unless these three are passing in CI. See contribution guidelines for more.Additional guidelines:
pyproject.tomlfiles (even optional ones) unless they are required for unit tests.