Skip to content

Create a single dictionary when creating a CoreConfig instance#11384

Merged
sydney-runkle merged 2 commits intomainfrom
config-memory-improvement
Feb 6, 2025
Merged

Create a single dictionary when creating a CoreConfig instance#11384
sydney-runkle merged 2 commits intomainfrom
config-memory-improvement

Conversation

@sydney-runkle
Copy link
Copy Markdown
Contributor

@sydney-runkle sydney-runkle commented Feb 4, 2025

Makes this function 25% faster and uses less memory on the temporary dict allocation.

@github-actions github-actions Bot added the relnotes-fix Used for bugfixes. label Feb 4, 2025
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Feb 4, 2025

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7776e5e
Status: ✅  Deploy successful!
Preview URL: https://39e2a76f.pydantic-docs.pages.dev
Branch Preview URL: https://config-memory-improvement.pydantic-docs.pages.dev

View logs

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Feb 4, 2025

CodSpeed Performance Report

Merging #11384 will not alter performance

Comparing config-memory-improvement (7776e5e) with main (929e8f4)

Summary

✅ 45 untouched benchmarks

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 4, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  pydantic/_internal
  _config.py
Project Total  

This report was generated by python-coverage-comment-action

@sydney-runkle sydney-runkle added relnotes-performance Used for performance improvements. and removed relnotes-fix Used for bugfixes. labels Feb 4, 2025
@sydney-runkle sydney-runkle marked this pull request as ready for review February 5, 2025 18:50
@Viicos Viicos changed the title Potentially a more memory efficient approach to core config construction Create a single dictionary when creating a CoreConfig instance Feb 6, 2025
@sydney-runkle sydney-runkle merged commit e354fd4 into main Feb 6, 2025
@sydney-runkle sydney-runkle deleted the config-memory-improvement branch February 6, 2025 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

relnotes-performance Used for performance improvements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants