Andrew Kane

Results 378 comments of Andrew Kane

Sampling the following program on Mac arm64: ```ruby require "ruby-vips" loop do image = Vips::Image.new_from_file("image.png") image.copy_memory end ``` shows it's spending most of the time (~95%) on `vips_sink_memory` in libvips....

Thanks @scottbarrow! Very well researched as @bmulholland mentioned. Pushed a slightly different fix in the commit above (wanted to limit it to affected Active Storage versions and avoid relying on...

fwiw, this is causing the SPTAG [build to fail](https://github.com/erikbern/ann-benchmarks/pull/368) for ann-benchmarks. It'd be nice to have SPTAG included in the [April 2023 benchmarks](https://github.com/erikbern/ann-benchmarks/issues/363).

Great, thanks @pabs3! Working great: https://github.com/erikbern/ann-benchmarks/pull/370

Hi @woto, thanks for the PR. Can you share more about your use case?

Hi @cumet04, thanks for the PR! It looks good, but want to wait until 6.0 to merge since it changes the current behavior.

I'm not aware of a way to get strace-like output without disabling System Integrity Protection, but looking at samples of the processes, psycopg is spending ~99% of time on `_platform_memmove`,...

It looks like there's some mention of `memmove` / `PQputCopyData` in #255 and of similar behavior in the code: https://github.com/psycopg/psycopg/blob/558cbe7ef7ef6a6d1f6c65e368aaaf9f9a10108e/psycopg/psycopg/_copy_base.py#L49-L52

It looks like the issue is the connection is in nonblocking mode but never flushed. From the [Postgres docs](https://www.postgresql.org/docs/current/libpq-async.html#LIBPQ-PQSETNONBLOCKING): > In the nonblocking state, successful calls to PQsendQuery, PQputline, PQputnbytes,...