Skip to content

Commit f472b0c

Browse files
committed
v0.3.0[ci skip]
1 parent 7ab22ae commit f472b0c

File tree

3 files changed

+54
-6
lines changed

3 files changed

+54
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## [0.3.0 - 2022-06-xx]
5+
## [0.3.0 - 2022-06-11]
66

77
### Added
88

@@ -21,7 +21,8 @@ All notable changes to this project will be documented in this file.
2121

2222
### Fixed
2323

24-
- Other little speed optimizations.
24+
- Minor usage fixes.
25+
- Speed optimizations.
2526

2627
## [0.2.5 - 2022-05-30]
2728

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
| Version | Supported |
77
|---------|--------------------|
8-
| 0.2.3+ | :white_check_mark: |
9-
| <0.2.3 | :x: |
8+
| 0.3.0+ | :white_check_mark: |
9+
| <0.3.0 | :x: |
1010

1111

1212
## Reporting a Vulnerability

docs/benchmarks.rst

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Benchmarks
2-
==========
1+
Decoding Benchmarks
2+
===================
33

44
Tests performed on Intel CPU i7-9700.
55

@@ -91,3 +91,50 @@ Moving to ``ctx_mem`` = ``True`` what is by default now, gives much more signifi
9191
Reading HEIF metadata and image properties gives us ``3x`` faster speed.
9292
Decoding of small images, what we test here by decoding thumbnails, gives us ``30%`` increase of speed.
9393
Decoding of big images becomes faster by 5%, after we switch to ``ctx_mem`` = ``True``.
94+
95+
Encoding benchmarks
96+
===================
97+
98+
Comparing 0.2.5 and 0.3.0 on CPython 3.10
99+
100+
.. code-block:: python
101+
102+
DATASET = [Path("rgb8_512_512_1_2.heic"), Path("etc_heif/nokia/alpha_3_2.heic"), Path("rgb10_639_480_1_3.heic")]
103+
104+
Benchmark code A
105+
----------------
106+
107+
.. code-block:: python
108+
109+
def save_heif_file():
110+
out_buf = BytesIO()
111+
for image_path in DATASET:
112+
heif_file = open_heif(image_path)
113+
heif_file.save(out_buf)
114+
115+
benchmark.pedantic(save_heif_file, iterations=1, rounds=40, warmup_rounds=1)
116+
117+
Benchmark code B
118+
----------------
119+
120+
.. code-block:: python
121+
122+
def pillow_save_heif():
123+
out_buf = BytesIO()
124+
for image_path in DATASET:
125+
image = Image.open(image_path)
126+
image.save(out_buf, save_all=True, format="HEIF")
127+
128+
benchmark.pedantic(pillow_save_heif, iterations=1, rounds=40, warmup_rounds=1)
129+
130+
+-------------------------------+----------+----------+
131+
| Benchmark | 0.2.5 | 0.3.0 |
132+
+===============================+==========+==========+
133+
| **A** `HeiFile` mem_ctx=False | 1.81 s | 1.79 s |
134+
+-------------------------------+----------+----------+
135+
| **A** `HeiFile` mem_ctx=True | 1.80 s | 1.78 s |
136+
+-------------------------------+----------+----------+
137+
| **B** `Pillow` mem_ctx=False | 1.92 s | 1.90 s |
138+
+-------------------------------+----------+----------+
139+
| **B** `Pillow` mem_ctx=True | 1.91 s | 1.89 s |
140+
+-------------------------------+----------+----------+

0 commit comments

Comments
 (0)