Skip to content

Conversation

@jonhnet
Copy link

@jonhnet jonhnet commented Nov 15, 2025

cfImageCrop constructs a new image with the default tile cache size. This create disastrously bad performance on large images.

For example, calling imagetoraster on an ARCHE sized page (36x48 inches, 21600 pixels wide) takes over 300s before this patch, all of which is in libc_read and libc_write. The cache size is 10 tiles, but the required cache size is actually about 900-1000 tiles. With the patch, the temp image correctly inherits a bigger cache (that was sized using the image width), and that same invocation costs 40s.

cfImageCrop constructs a new image with the default tile cache
size. This create disastrously bad performance on large images.

For example, calling imagetoraster on an ARCHE sized page (36x48 inches,
21600 pixels wide) takes over 300s before this patch, all of which is in
libc_read and libc_write. The cache size is 10 tiles, but the required
cache size is actually about 900-1000 tiles.  With the patch, the temp
image correctly inherits a bigger cache (that was sized using the image
width), and that same invocation costs 40s.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant