Commit Graph

19122 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
e296e3fba5 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-01-24 19:47:17 +00:00
Kevin Newton
fdd80169fd Reduce memory arena contention
Previously there was one memory arena for all threads, making it
the bottleneck for multi-threaded performance. As the number of
threads increased, the contention for the lock on the arena would
grow, causing other threads to wait to acquire it.

This commit makes it use 8 memory arenas, and round-robbins how
they are assigned to threads. Threads keep track of the index that
they should use into the arena array, assigned the first time the
arena is accessed on a given thread.

When an image is first created, it is allocated from an arena.
When the logic to have multiple arenas is enabled, it then keeps
track of the index on the image, so that when deleted it can be
returned to the correct arena.

Effectively this means that in single-threaded programs, this
should not really have an effect. We also do not do this logic if
the GIL is enabled, as it effectively acts as the lock on the
default arena for us.

As expected, this approach has no real noticable effect on regular
CPython. On free-threaded CPython, however, there is a massive
difference (measuring up to about 70%).
2025-01-24 14:39:42 -05:00
Hugo van Kemenade
51df14282f
Merge pull request #8713 from radarhere/22_04 2025-01-24 14:38:30 +02:00
Andrew Murray
e31441fc41 Use Ubuntu 22.04 for 24.04 ppc64le and s390x 2025-01-24 19:51:07 +11:00
Hugo van Kemenade
58dd4a7dac
Merge pull request #8702 from radarhere/imagefile_fp 2025-01-20 19:29:05 +02:00
Andrew Murray
c78d23d547 Moved _close_fp into ImageFile 2025-01-18 21:22:44 +11:00
Andrew Murray
4ff18e03b8 Moved file pointer handling into ImageFile close 2025-01-18 20:57:04 +11:00
Hugo van Kemenade
cf7dd2f0e9
Merge pull request #8700 from radarhere/ubuntu 2025-01-18 11:10:40 +02:00
Andrew Murray
ba606622b4 Updated Ubuntu arm to 24.04 with arm64 runner 2025-01-18 13:53:39 +11:00
Hugo van Kemenade
a92a664ee5
Merge pull request #8699 from radarhere/mozjpeg 2025-01-17 23:53:04 +02:00
Andrew Murray
284297755a Updated capitalization 2025-01-18 07:55:49 +11:00
Andrew Murray
e79b298443 Merge branch 'main' into mozjpeg 2025-01-18 07:54:07 +11:00
Andrew Murray
30c4ad484c
Updated capitalization
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-01-18 07:48:15 +11:00
Hugo van Kemenade
4f7510b77b
Merge pull request #8689 from radarhere/get_child_images 2025-01-17 22:29:50 +02:00
Hugo van Kemenade
85a6df534c
Merge pull request #8698 from radarhere/arm64 2025-01-17 21:50:35 +02:00
Hugo van Kemenade
7446348b73
Merge pull request #8525 from hugovk/gha-windows-32-bit 2025-01-17 20:46:08 +02:00
Andrew Murray
6a0ac411e2 Added mozjpeg documentation 2025-01-17 18:57:12 +11:00
Andrew Murray
be8e55d28d Added deprecation warning 2025-01-17 18:34:23 +11:00
Andrew Murray
176c5b3749 Added pypy to CIBW_ENABLE 2025-01-17 11:51:42 +11:00
Andrew Murray
a04e76a84f Use arm64 Linux runners 2025-01-17 11:51:21 +11:00
Andrew Murray
d2122ab17f
Merge pull request #8696 from radarhere/numpy
Test Windows amd64 wheels with NumPy
2025-01-17 08:45:08 +11:00
Hugo van Kemenade
ade99aaa90
Merge branch 'main' into gha-windows-32-bit 2025-01-16 17:01:59 +02:00
Hugo van Kemenade
bff83cff59
Merge pull request #8568 from radarhere/fixifd 2025-01-16 16:33:42 +02:00
Andrew Murray
c67ed4678b
Moved strings inside debug statement
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-01-16 23:48:44 +11:00
Hugo van Kemenade
e59549f4e5
Merge pull request #8695 from radarhere/miniconda 2025-01-16 14:12:20 +02:00
Hugo van Kemenade
df7e42eef1
Merge pull request #8681 from radarhere/types 2025-01-16 14:00:25 +02:00
Andrew Murray
536aee5bbd Test Numpy on amd64 2025-01-16 22:12:53 +11:00
Andrew Murray
e70c821436 Removed miniconda CPPFLAGS 2025-01-16 20:57:49 +11:00
Hugo van Kemenade
84d58a0282
Merge pull request #8694 from radarhere/exceptions 2025-01-14 17:04:39 +02:00
Hugo van Kemenade
bdfd881c6d
Merge pull request #8690 from radarhere/314 2025-01-14 16:24:41 +02:00
Andrew Murray
cf438c53ee Removed UnidentifiedImageError, as it inherits from OSError 2025-01-14 21:04:08 +11:00
Andrew Murray
0f2c554c69 Improved comment 2025-01-14 21:03:20 +11:00
Hugo van Kemenade
f521a4be7d
Merge pull request #8686 from radarhere/test_embeddable_wheels 2025-01-13 21:21:06 +02:00
Andrew Murray
2ce2ff297c Test Python 3.14 pre-release 2025-01-14 05:54:19 +11:00
Hugo van Kemenade
513a72abb5
Merge pull request #8691 from radarhere/sphinx 2025-01-13 19:08:28 +02:00
Andrew Murray
a4018d192c Added Sphinx configuration key 2025-01-13 21:07:32 +11:00
Andrew Murray
a922126ed7 Assert fp is not None 2025-01-13 07:57:50 +11:00
Andrew Murray
34762ded75 Assert JpegIFByteCount is int 2025-01-13 07:57:28 +11:00
Andrew Murray
5ad98e7abb Moved get_child_images() 2025-01-13 07:54:43 +11:00
Andrew Murray
7166a09538 Skip test_embeddable if compiler cannot be initialized 2025-01-11 18:57:41 +11:00
Hugo van Kemenade
3111e37bf4
Merge pull request #8679 from radarhere/test 2025-01-10 21:13:33 +02:00
Hugo van Kemenade
bce6097a96
Merge pull request #8684 from radarhere/spider 2025-01-10 19:29:23 +02:00
Andrew Murray
64bfdff6c8 Only F mode starts with F 2025-01-10 21:51:33 +11:00
Hugo van Kemenade
8878511476
Merge pull request #8683 from radarhere/test_embeddable 2025-01-10 12:01:59 +02:00
Andrew Murray
0d93c030a5 Test passes in Python 3.13 2025-01-10 19:10:42 +11:00
Andrew Murray
8430193bed
Merge pull request #8682 from hugovk/mingw
Use python-numpy and python-olefile instead of virtual python3 packages
2025-01-10 07:53:52 +11:00
Andrew Murray
5ad7f70ade
Merge branch 'main' into types 2025-01-09 23:44:33 +11:00
Andrew Murray
15ade68f40
Merge branch 'main' into test 2025-01-09 23:44:29 +11:00
Hugo van Kemenade
8603d6512a Use python-numpy and python-olefile instead of python3-numpy and python3-olefile 2025-01-09 14:22:29 +02:00
Hugo van Kemenade
6fc496ee5b
Merge pull request #8678 from radarhere/mingw 2025-01-09 14:18:02 +02:00