-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Description
ImageMagick version
7.1.1-46
Operating system
Linux
Operating system, version and so on
Ubuntu 22.04 LTS
Description
We encountered some very strange behavior when drawing geometries.
Here is an example of what we want to draw (50_000 circles):

This works satisfactorily fast (about 4 seconds) in three out of four cases. But when the circle has a stroke and the scaling in the transformation is greater than one, there is a sharp drop in performance—drawing takes 44 seconds.

The situation is even worse if the circle is drawn using a path (arc with angle=2*PI). In this case, drawing 50,000 circles will not complete.
Steps to Reproduce
These images are automatically generated by our library. The MVG is dumped using the DrawGetVectorGraphics function.
DrawCircle test:
- Unzip circle_50000.zip
- Run
magick -size 600x400 mvg:./circle_50000.mvg circle_50000.png
Result: conversion takes acceptable time, like ~5 seconds (could be better, though?) - Unzip [email protected]
- Run
magick -size 1200x800 mvg:./[email protected] [email protected]
Result: conversion takes unacceptable 40+ seconds, yet the only difference is theaffine 2 0 0 2 0 0at the beginning of the file.
DrawPath* test:
- Unzip path_10000.zip
- Run
magick -size 800x400 mvg:./path_10000.mvg path_10000.png
Result: converted in zero seconds. - Unzip [email protected]
- Run
magick -size 1200x800 mvg:./[email protected] [email protected]
Result: conversion takes unacceptable 5 seconds to draw just 10_000 circles, yet the only difference is theaffine 2 0 0 2 0 0at the beginning of the file.
Images
circle_50000.zip
[email protected]
path_10000.zip
[email protected]
Metadata
Metadata
Assignees
Labels
No labels