mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-02 04:55:36 +00:00
Chore: Improve idle memory via more lazy imports (#14599)
* Chore: Import dateparser lazily so processes that never parse dates skip it * Chore: Import turbohtml lazily in the mail parser * Chore: Import lxml lazily in the SVG validator * Chore: Import paperless_ai.indexing lazily in document tasks * Chore: Import paperless_ai helpers lazily in views * Chore: Read the OCRmyPDF sRGB profile on first use instead of at import * Chore: Import pikepdf and img2pdf lazily so startup does not load them * Chore: Reuse the initialized Django ASGI application for HTTP routing
This commit is contained in:
1 parent
a5d3247ca7
commit
6f99ad9469
24 files changed
+110
-73
No files matched your search
@@ -61,7 +61,7 @@ class TestChatStreamingViewInputValidation(APITestCase):
|
||||
return_value=self._mock_ai_enabled(),
|
||||
),
|
||||
mock.patch(
|
||||
"documents.views.stream_chat_with_documents",
|
||||
"paperless_ai.chat.stream_chat_with_documents",
|
||||
return_value=iter(chunks),
|
||||
),
|
||||
):
|
||||
@@ -104,7 +104,7 @@ class TestChatStreamingViewUnrestrictedFlag:
|
||||
"""
|
||||
mocker.patch("documents.views.AIConfig").return_value.ai_enabled = True
|
||||
return mocker.patch(
|
||||
"documents.views.stream_chat_with_documents",
|
||||
"paperless_ai.chat.stream_chat_with_documents",
|
||||
return_value=iter(()),
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user