MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Timing graphics in the real world


On 20/11/2011 10:38, DrMajorBob wrote:
> A quote from Help:
>
> "AbsoluteTiming[expr] measures only the time involved in actually
> evaluating expr, not time involved in formatting the result."
>
> Graphics rendering occurs in the FrontEnd, not the Kernel, so
> AbsoluteTiming doesn't count it.
>
> Bobby

Unfortunately, this isn't exactly right. AbsoluteTiming measures - as 
one might expect - absolute time! The problem is that it measures it 
before handing over the result to the FE. One answer is to measure the 
absolute time of something like this:

(Print[Plot[<something fancy>]];LinkWrite[$ParentLink, 
CellInformation[SelectedNotebook[]]])//AbsoluteTiming

This forces the FE to finish rendering before it measures the absolute time.

A year ago, I gave a paper about a variety of subtle Mathematica 
timing/performance issues, which included this point:

http://www.wolfram.com/events/techconf2010/speakers.html

David Bailey
http://www.dbaileyconsultancy.co.uk






  • Prev by Date: Re: Matrices as operators
  • Next by Date: Re: Timing function
  • Previous by thread: Re: Timing graphics in the real world
  • Next by thread: Re: Timing graphics in the real world