Skip to content

Conversation

sydney-runkle
Copy link
Contributor

@sydney-runkle sydney-runkle commented Aug 29, 2024

Reducing a significant amount of temporary allocations in cases with large namespaces:

this branch

📏 Total allocations:
        2973786

📦 Total memory allocated:
        4.018GB

🥇 Top 5 largest allocating locations (by size):
        - add_module_globals:/Users/programming/pydantic_work/pydantic/pydantic/_internal/_typing_extra.py:215 -> 2.028GB
        - validate_core_schema:/Users/programming/pydantic_work/pydantic/pydantic/_internal/_core_utils.py:570 -> 902.446MB
        - __init__:/Users/programming/anaconda3/envs/pydantic_env/lib/python3.10/typing.py:668 -> 349.622MB
        - create_schema_validator:/Users/programming/pydantic_work/pydantic/pydantic/plugin/_schema_validator.py:50 -> 162.853MB
        - complete_model_class:/Users/programming/pydantic_work/pydantic/pydantic/_internal/_model_construction.py:595 -> 116.021MB

main

📏 Total allocations:
        2981103

📦 Total memory allocated:
        5.032GB

🥇 Top 5 largest allocating locations (by size):
        - add_module_globals:/Users/programming/pydantic_work/pydantic/pydantic/_internal/_typing_extra.py:215 -> 2.028GB
        - push:/Users/programming/pydantic_work/pydantic/pydantic/_internal/_generate_schema.py:339 -> 1.014GB
        - validate_core_schema:/Users/programming/pydantic_work/pydantic/pydantic/_internal/_core_utils.py:570 -> 901.436MB
        - __init__:/Users/programming/anaconda3/envs/pydantic_env/lib/python3.10/typing.py:668 -> 347.622MB
        - create_schema_validator:/Users/programming/pydantic_work/pydantic/pydantic/plugin/_schema_validator.py:50 -> 164.853MB

@github-actions github-actions bot added the relnotes-fix Used for bugfixes. label Aug 29, 2024
Copy link

cloudflare-workers-and-pages bot commented Aug 29, 2024

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 164bc1d
Status: ✅  Deploy successful!
Preview URL: https://cbe17a71.pydantic-docs.pages.dev
Branch Preview URL: https://no-dupe-in-push.pydantic-docs.pages.dev

View logs

Copy link

codspeed-hq bot commented Aug 29, 2024

CodSpeed Performance Report

Merging #10267 will not alter performance

Comparing no-dupe-in-push (164bc1d) with main (3809bd5)

Summary

✅ 34 untouched benchmarks

Copy link
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  pydantic/_internal
  _generate_schema.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 Aug 29, 2024
@sydney-runkle sydney-runkle changed the title WIP: update instead of realloc Update ns stack with already copied ns Aug 29, 2024
@sydney-runkle sydney-runkle merged commit e13b15e into main Aug 29, 2024
61 checks passed
@sydney-runkle sydney-runkle deleted the no-dupe-in-push branch August 29, 2024 15:00
AdolfoVillalobos pushed a commit to AdolfoVillalobos/pydantic that referenced this pull request Aug 30, 2024
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