Commit Graph

15 Commits

Author SHA1 Message Date
John Cupitt 976db37f84
Revised threading system (#3105)
* reimplement threadpool

just a set of threads that get recycled

"ninja test" passes and dzsave seems to work, though pytest fails for
some reason

* clean up threading code a bit

move base stuff into thread.c, so we have a simple

	thread -> threadset -> threadpool

layering

* start trying to revert g_threadpool

based on the original commit

* working!

nice low systime again

still need to repply cnages to threadpool.c since 80e0cc3d1

* reapply fixes from master

so threadpool.c is now up to date

* rename VipsThread as VipsWorker

a bit less confusing

* use a semaphore to count workers in a pool

* tidy up

* formatting

* dynamic threadpool sizing

based on counting the number of blocked threads in each pool

it works, but the improvement is not great :(

* add "concurrency" metadata item

so operators can hint threadpool size (dzsave especially)

* don't use thinstrip for small images

* add RGB mode to openslide

since flatten was taking 20% of CPU time for dzsave

* fix up rgb mode

now actually works

* make the tile buffer per thread

in the new openslideload rgb mode

* fix dynamic pool downsize

* mild refactoring

* fix the buffer system

oops, turned it off by mistake

* all done!

* revise changelog

* Update libvips/iofuncs/threadset.c

Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>

* Update libvips/iofuncs/threadset.c

Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>

* LSan: add libMagickCore to suppression file

* Revert "Remove mutex lock for VipsThreadStartFn"

This reverts commit 41440491.

* add VIPS_MAX_THREADS

to set a hard limit on the threadset size

* Revert "Revert "Remove mutex lock for VipsThreadStartFn""

This reverts commit 77e8520966ba79194fff3b4e648bbd295cd5c260.

* remove sslock from sink.c

* move fixed threadpool build to init

not first use

* add some doc comments

* revert test suite threshold change

* add a test for MAX_THREADS

and move the test tmp/ area into the builddir

* limit VIPS_MAX_THREADS to sane values

* use tabs rather than spaces

Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>
2022-10-26 15:25:19 +01:00
Eli Schwartz e73f003d33
skip some skippable tests (#3102)
* tests: consolidate redundant, duplicated helper code

These functions currently exist in a sourced shell library, but there is
an identical copy of them in a single test file. Get rid of this
duplicate definition.

* tests: mark some tests as skipped if bc is not installed

`exit 77` is the GNU exitcode protocol for tests that cannot be run
because their prerequisites are not available. If `bc` is not installed,
and it often isn't, the test can be short-circuited instead of failing;
meson will report them in "warning yellow".

* tests: mark some tests as skipped if support is not compiled

Not all test cases can be cleanly marked as skipped -- sometimes,
multiple things are checked, and having one be unavailable should not
mean skipping all tests.

But in a couple cases, a test file only tests one thing, and that may be
skipped. In such cases, it can be semantically indicated in the test
harness report collection, that a skip occurred.
2022-10-19 18:13:48 +01:00
Doug Nazar 97f5417aaa
Fix tests when using a separate build dir. (#2405) 2021-08-18 11:45:02 +01:00
John Cupitt 53255419d7 fix "make check" on raspbian
unset LC_ALL in test/, thanks ewelot
2021-05-09 15:49:44 +01:00
John Cupitt 48f675db45 update jpg name in variables.sh.in as well 2019-11-27 08:58:30 +00:00
John Cupitt 99f535c57a add streams.c test
tests VipsStream*u, at a basic level at least.
2019-11-24 18:22:43 +00:00
John Cupitt 09b4ce6d9b test gifload for fd leaks 2019-10-06 10:55:19 +01:00
John Cupitt 51e7645859 fix "make check"
eited the wrong file :(
2018-07-06 16:11:02 +01:00
John Cupitt fe3262f719 test unicode filename support 2016-08-19 09:15:34 +01:00
John Cupitt 1bf8e0847f run py tests from "make check"
though they fail on ubuntu 16.04 due to giflib dumbness

magickload is also failing, investigate
2016-06-02 23:10:14 +02:00
John Cupitt af8b43b16d fix to make check in non-C locales
"make check" uses bc, which needs '.' as a decimal sep.

https://github.com/jcupitt/libvips/issues/367
2016-01-17 09:29:25 +00:00
John Cupitt a560d3b8c2 more osx help 2014-12-20 22:25:19 +00:00
John Cupitt 39c2bf9291 more stuff for homebrew 2014-12-20 17:12:12 +00:00
John Cupitt 810abeea34 small fixups 2014-11-19 17:32:29 +00:00
John Cupitt ee4416040b make a test suite
put the python and non-nip2 bits of the nip2 suite together

some test images too
2014-11-19 15:01:28 +00:00