Open PallHaraldsson opened 4 years ago
@PallHaraldsson That's interesting behavior; I woud have expected the third and subsequent plots to take the same time as the second.
There are some performance-related changes on my local master branch that might affect this. After I release 0.11 (should be a few days now), I'll run some profiling and try to figure out what is going on.
The good thing is that even the first plot is very fast!
Is it possible that plot(randn(10^6),randn(10^6))
simply sends the commands to gnuplot, but do not wait for it to be completed?
On my computer I get consistent results with display(plot(randn(10^6),randn(10^6)))
.
@gcalderone I need to look at this in more depth (after I manage to get the next release out). However, I think I'm waiting until gnuplot finishes plotting. Gaston tells gnuplot to print a message on stderr as the last step of a plot command, and does not return until it gets the message back.
FYI: Second plot speed is much better as expected (with fewer allocations), but only third plot has fewest allocations, and expected speed.
I wouldn't say this is an "issue", just an observation on non-master. I've only heard of "first-plot issues". I wander about the reason and if it applies to other (plotting) packages and master here. I've always relied on benchmarking code after running ONCE. It may not be about your package, rather julia (1.5)?
It seems I ruled out issue with Julia itself or
@time
.