Avatar for the sparckles user
sparckles
Robyn
BlogDocsChangelog

refactor: openApi made lazy.

#1066Merged
Comparing
dave42w:lazy-openapi
(
f9bf080
) with
main
(
7495342
)
CodSpeed Performance Gauge
-48%
Regression
5
Untouched
141

Benchmarks

146 total
test_add_request_header
integration_tests/test_app.py
CodSpeed Performance Gauge
-48%
341.9 µs652.8 µs
test_add_response_header
integration_tests/test_app.py
CodSpeed Performance Gauge
-48%
342 µs652.5 µs
test_lifecycle_handlers
integration_tests/test_app.py
CodSpeed Performance Gauge
-45%
373.5 µs682.9 µs
test_allow_cors
integration_tests/test_app.py
CodSpeed Performance Gauge
-40%
455.3 µs756.7 µs
test_custom_openapi_spec
integration_tests/test_openapi.py
CodSpeed Performance Gauge
-39%
466.3 µs765.7 µs
test_openapi_query_params
integration_tests/test_openapi.py
CodSpeed Performance Gauge
-3%
6.3 ms6.5 ms
test_json_handler
integration_tests/test_openapi.py
CodSpeed Performance Gauge
-3%
6.3 ms6.5 ms
test_add_openapi_path
integration_tests/test_openapi.py
CodSpeed Performance Gauge
-3%
6.3 ms6.5 ms
test_openapi_response_body
integration_tests/test_openapi.py
CodSpeed Performance Gauge
-3%
6.3 ms6.5 ms
test_openapi_request_body
integration_tests/test_openapi.py
CodSpeed Performance Gauge
-3%
6.3 ms6.5 ms
test_add_subrouter_paths
integration_tests/test_openapi.py
CodSpeed Performance Gauge
-3%
6.3 ms6.5 ms
test_exception_handling[/async/exception/post-post]
integration_tests/test_exception_handling.py
CodSpeed Performance Gauge
0%
4.8 ms4.8 ms
test_post_async_decorator_view
integration_tests/test_views.py
CodSpeed Performance Gauge
0%
4.8 ms4.8 ms
test_delete_with_param[sync]
integration_tests/test_delete_requests.py
CodSpeed Performance Gauge
0%
4.8 ms4.8 ms
test_split_request_params_get_combined_failure[sync]
integration_tests/test_split_request_params.py
CodSpeed Performance Gauge
0%
5 ms5 ms
test_basic_get[/async/dict/const-async dict const get-async_const-dict]
integration_tests/test_basic_routes.py
CodSpeed Performance Gauge
0%
4.8 ms4.9 ms
test_put_with_param[async]
integration_tests/test_put_requests.py
CodSpeed Performance Gauge
0%
4.7 ms4.8 ms
test_exception_handling[/async/get/no_dec-get]
integration_tests/test_add_route_without_decorator.py
CodSpeed Performance Gauge
0%
4.7 ms4.7 ms
test_middlewares[sync]
integration_tests/test_middlewares.py
CodSpeed Performance Gauge
0%
4.7 ms4.8 ms
test_basic_get[/sync/str/const-sync str const get-None-None]
integration_tests/test_basic_routes.py
CodSpeed Performance Gauge
0%
4.7 ms4.7 ms
test_split_request_params_get_body[split_request_untyped-async]
integration_tests/test_split_request_params.py
CodSpeed Performance Gauge
0%
4.8 ms4.9 ms
test_split_request_params_get_body[split_request_untyped-sync]
integration_tests/test_split_request_params.py
CodSpeed Performance Gauge
0%
4.8 ms4.9 ms
test_global_index_request
integration_tests/test_base_url.py
CodSpeed Performance Gauge
0%
4.6 ms4.6 ms
test_queries[async]
integration_tests/test_get_requests.py
CodSpeed Performance Gauge
0%
9 ms9 ms
test_put[async]
integration_tests/test_put_requests.py
CodSpeed Performance Gauge
0%
4.8 ms4.8 ms

Commits

Click on a commit to change the comparison range
Base
main
7495342
-48.73%
refactor: openApi made lazy. This is a staging post so there are extra tests (in all the decorators). Fixes a potential issue in __init__ where the default argument creates a shared object at parse time rather than a separate one for each instance. As only one instance, not normally an issue but not good practice.
0dccef3
2 years ago
by dave42w
+0.07%
refactor: openApi made lazy.
642eac9
2 years ago
by dave42w
-0.02%
refactor: try to solve the speed issue by improving handling moving from allowing None for openApi_tags to not
2ae5e7f
2 years ago
by dave42w
-0.07%
refactor: slightly optimised lower_http_method I've tested with 100,000 loops. This is marginally faster.
f9ebbee
2 years ago
by dave42w
+0.02%
refactor: remove extra Robyn instance variable to avoid extra side effects in the future. No consistent peformance impact on 100,000 Robyn(__file__) calls
b1dae0b
2 years ago
by dave42w
-0.08%
Merge branch 'sparckles:main' into lazy-openapi
cf11725
2 years ago
by dave42w
+0.04%
Merge branch 'sparckles:main' into lazy-openapi
2d261e0
2 years ago
by dave42w
+1.14%
Merge branch 'sparckles:main' into lazy-openapi
f9bf080
2 years ago
by dave42w
© 2026 CodSpeed Technology
Home Terms Privacy Docs