You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See the sample program below for a minimal test case – it simply draws a polygon from a list of input coordinates.
What did you expect to happen?
Time taken to render the polygon line to be linear (and very small) even for 100'000s of points.
What actually happened?
Apparently in any Pillow version after 7.0.0 the time taken to draw coordinate lists appears to increase non-linear with the number of input coordinates. When processing larger input files we regularily end up with 100'000s or perhaps even 1'000'000s points to be (nicely) drawn by Pillow for file visualization. With 7.0.0 this was no problem, with drawing times hardly ever exceeding a second at most, but since 7.1.1 (and likely also 7.1.0) the drawing suddenly turned into the slowest part of our production pipeline for larger files.
What are your OS, Python and Pillow versions?
OS: Linux x86-64 with Conda
Python: 3.6 or 3.9
Pillow: 7.1.1 (and any later version, 7.1.0 is likely affected too ) – using conda-forge build
Referenced JSON file: pillow_slow_polygon_coords.json – this is audio waveform data but the issue is likely the same for other data as only the number of coordinates appear to matter.
The text was updated successfully, but these errors were encountered:
What did you do?
See the sample program below for a minimal test case – it simply draws a polygon from a list of input coordinates.
What did you expect to happen?
Time taken to render the polygon line to be linear (and very small) even for 100'000s of points.
What actually happened?
Apparently in any Pillow version after 7.0.0 the time taken to draw coordinate lists appears to increase non-linear with the number of input coordinates. When processing larger input files we regularily end up with 100'000s or perhaps even 1'000'000s points to be (nicely) drawn by Pillow for file visualization. With 7.0.0 this was no problem, with drawing times hardly ever exceeding a second at most, but since 7.1.1 (and likely also 7.1.0) the drawing suddenly turned into the slowest part of our production pipeline for larger files.
What are your OS, Python and Pillow versions?
Very likely related: #4333
Referenced JSON file: pillow_slow_polygon_coords.json – this is audio waveform data but the issue is likely the same for other data as only the number of coordinates appear to matter.
The text was updated successfully, but these errors were encountered: