TGViewer
Находки в опенсорсе: Python Находки в опенсорсе: Python @opensource_findings_python · 1.06K subscribers
Post #342 151
🚀 New issue to wemake-services/django-modern-rest by @sobolevn
📝 Improve the performance of `_run_checks` and `_run_async_checks` (#1454)


Currently we have two functions with logic on how to run endpoint checks:

django-modern-rest/dmr/endpoint.py

Lines 417 to 425 in 405ba9b

and then we check inside each call if this call was even needed:

django-modern-rest/dmr/endpoint.py

Lines 427 to 432 in 405ba9b

CALL is not a cheap operation in Python, so I propose a different design.
We should check if the call is needed before the call itself. And only call parts that are actually required.

This is especially important for the async code:

django-modern-rest/dmr/endpoint.py

Lines 460 to 471 in 405ba9b

Where we are awaiting 4 indeprendent coroutines.
We should not, if possible.


#good_first_issue #help_wanted #performance #opensource_september #django_modern_rest
sent via relator
More from @opensource_findings_python
  1. Sep 22, 2026🚀 New issue to faststream-community/zMQTT by @borisalekseev 📝 Mark flaky Artemis test xf…
  2. Sep 17, 2026Помните про https://github.com/ozeranskii/httptap? Я писал о нем давно еще - > тут. Наклеп…
  3. Sep 15, 2026🚀 New issue to wemake-services/django-modern-rest by @sobolevn 📝 `test_custom_union_form…
  4. Sep 13, 2026🚀 New issue to wemake-services/django-modern-rest by @milssky 📝 Changes in benchmarking…
  5. Sep 13, 2026🚀 New issue to wemake-services/django-modern-rest by @sobolevn 📝 Fix `operation_id` defa…
  6. Sep 13, 2026🚀 New issue to wemake-services/django-modern-rest by @sobolevn 📝 Fix unused `security` f…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →