@@ -26,23 +26,33 @@ The following benchmarks show total module loads, import and runtimes. All times
26
26
The first benchmark is for a minimal project that uses the settings file generated by
27
27
:django-admin: `startproject `. You can see that when :pypi: `rich ` is installed several hundred extra
28
28
modules must be imported. This adds a few 10s of milliseconds to the import time. To avoid this,
29
- uninstall :pypi: `rich `. As of :pypi: `Typer ` 0.17, :pypi: `rich ` is lazily loaded, but until certain
30
- improvements are made to :pypi: `Typer `, the import time penalty is still incurred by
31
- :pypi: `django-typer `.
29
+ uninstall :pypi: `rich `. As of :pypi: `Typer ` 0.17, :pypi: `rich ` is lazily loaded, but ` until certain
30
+ improvements <https://github.com/django-commons/django-typer/issues/170> `_ are made to :pypi: `Typer `
31
+ , the import time penalty is still incurred by :pypi: `django-typer `.
32
32
33
- .. raw :: html
34
- :file: _static/img/minimal_profile.svg
33
+ .. only :: html
34
+
35
+ .. raw :: html
36
+ :file: _static/img/minimal_profile.svg
37
+
38
+ .. only :: latex
39
+
40
+ .. image :: _static/img/minimal_profile.svg
41
+ :width: 80%
35
42
36
43
The second benchmark shows the same stats for the :ref: `polls example code <building_commands >`.
37
44
These benchmarks compare the :class: `~django.core.management.BaseCommand ` native implementation
38
45
to the :class: `~django_typer.management.TyperCommand ` implementation. They show that the overhead of
39
46
using :pypi: `django-typer ` is minimal. On the order of a few 10s of milliseconds. Adding
40
47
:pypi: `rich ` increases this overhead slightly, but the impact is still barely noticeable.
41
48
42
- .. raw :: html
43
- :file: _static/img/polls_profile.svg
44
49
50
+ .. only :: html
51
+
52
+ .. raw :: html
53
+ :file: _static/img/polls_profile.svg
45
54
46
- .. success ::
55
+ .. only :: latex
47
56
48
- These benchmarks illustrate that adding
57
+ .. image :: _static/img/polls_profile.svg
58
+ :width: 80%
0 commit comments