Avatar for the koxudaxi user
koxudaxi
datamodel-code-generator
BlogDocsChangelog

Improve CLI startup time with lazy imports

#2799Merged
Comparing
perf/lazy-imports
(
edc0fdb
) with
main
(
8c7550c
)
CodSpeed Performance Gauge
0%
Untouched
73
Skipped
10

Benchmarks

10 total
test_main_nested_directory
tests/main/jsonschema/test_main_jsonschema.py
Skipped
247.9 ms*
test_main_strict_types_all_with_field_constraints
tests/main/jsonschema/test_main_jsonschema.py
Skipped
81 ms*
test_main_jsonschema_complex_any_of
tests/main/jsonschema/test_main_jsonschema.py
Skipped
68 ms*
test_main_allof_root_model_constraints
tests/main/jsonschema/test_main_jsonschema.py
Skipped
287.1 ms*
test_main_use_frozen_field_dataclass
tests/main/jsonschema/test_main_jsonschema.py
Skipped
35.8 ms*
test_main_use_frozen_field_pydantic_v1
tests/main/jsonschema/test_main_jsonschema.py
Skipped
48.5 ms*
test_main_use_frozen_field_pydantic_v2
tests/main/jsonschema/test_main_jsonschema.py
Skipped
54 ms*
test_main_jsonschema_reserved_field_name_typed_dict
tests/main/jsonschema/test_main_jsonschema.py
Skipped
29 ms*
test_main_jsonschema_reserved_field_name_dataclass
tests/main/jsonschema/test_main_jsonschema.py
Skipped
29.8 ms*
test_main_jsonschema_reserved_field_name_pydantic
tests/main/jsonschema/test_main_jsonschema.py
Skipped
45.6 ms*

Commits

Click on a commit to change the comparison range
Base
main
8c7550c
-0.04%
Improve CLI startup time with lazy imports
48cb8ec
4 months ago
by koxudaxi
-0.05%
Fix pysnooper initialization race condition
f5f29da
4 months ago
by koxudaxi
0%
Add fast path for --version and lazy imports for yaml/argcomplete
d23f339
4 months ago
by koxudaxi
+0.04%
Add fast path for --help and move enums to separate module
92b3b9f
4 months ago
by koxudaxi
+0.03%
Add fast path for --generate-prompt
4ec6ae0
4 months ago
by koxudaxi
-0.05%
Optimize CodeFormatter init and chain_as_tuple
9950cb2
4 months ago
by koxudaxi
+0.08%
Add fast path in imports to skip expensive field check for simple fields
40f76b5
4 months ago
by koxudaxi
+0.24%
Add fast path in DataModelFieldBase.imports for simple cases
33cb337
4 months ago
by koxudaxi
+0.07%
Use global variable cache for is_pydantic_v2 functions
330dfa9
4 months ago
by koxudaxi
-0.11%
Cache self_reference() result to reduce all_data_types iterations
37f664e
4 months ago
by koxudaxi
+0.22%
Remove unused code to fix coverage
edc0fdb
4 months ago
by koxudaxi
© 2026 CodSpeed Technology
Home Terms Privacy Docs