While examining How can I monitor the progress of a Plot? I was surprised to discover that in some cases ListPlot
in version 10.0 and 10.1 is orders of magnitude slower than it is in version 7. This is not rendering time but generation of the Graphics
itself. Here is an example.
dat = Table[{x, y}, {x, 200}, {y, RandomReal[9, 500]}];
lp = ListPlot[dat, ImageSize -> 600]
Rendering this plot takes only ~0.08 second according to EvaluationCompletionAction -> "ShowTiming"
as seen by evaluating lp
separately. However generating lp
(in 10.1) is quite slow:
ListPlot[dat] // RepeatedTiming // First
2.02
This takes only 0.018 second in version 7. Why is 10.1 two orders of magnitude slower?
David Skulsky reports these AbsoluteTiming
results:
MacBook Air: v8 2.1 sec, v9 0.43 sec, v10 3.6 sec.
Apparently the problem is not limited to v10 though it is most severe there. Should this not be a simple operation and much faster than this as indeed it was in version 7?
First attempt at analysis
Since no useful explanation had yet been provided I thought I would see if I could learn anything with a Trace
. What I learned is that the sheer size of Trace
is comically, exasperatingly large:
bigTrace = Trace[ListPlot[dat]];
ByteCount[bigTrace]
5728324392
A five and a half gigabyte trace? Really? I'll keep trying to learn more but that's just depressing. Can this be considered a bug? Someone please tell me this has been fixed after version 10.1.
Comments
Post a Comment