Re: Slow Show/Graphics in v6.0

*To*: mathgroup at smc.vnet.net*Subject*: [mg80961] Re: [mg80906] Slow Show/Graphics in v6.0*From*: Curtis Osterhoudt <cfo at lanl.gov>*Date*: Thu, 6 Sep 2007 05:31:33 -0400 (EDT)*Organization*: LANL*References*: <200709050653.CAA26889@smc.vnet.net>*Reply-to*: cfo at lanl.gov

Hi, Alex, I just tried the second example on a newish computer with a medium-end graphics card.... The actual calculation's timing was reported as ~0.89 seconds, but the display of the graphics took at least 40 seconds, and any resizing of the graphic drags one processor to a halt. I specifically got this computer (and graphics card) to run Mathematica quickly. Most of the calculations I've done with it benefit GREATLY from the graphics card, so that's probably one's best bet to radically speed up many operations if plotting of any sort is involved. On Wednesday 05 September 2007 00:53:32 Alex Shvydky wrote: > Hello, > > Just wanted to share my puzzlement (utter disappointment/ > frastration) with a ridiculously slow speed of Show/Graphics > routines in the v6.0 of Mathematica as compared to 5.2, > which to me at this point makes v6.0 plain unusable. > > Working with hydrodynamic simulations I need to > visualize the computational grid. So I wrote > simple Mathematica routines to draw a simulation grid. > In 5.2 they worked fabulously for the past couple of > years. > > Here's an example. > First, set up two 2dimensional x- and y-coordinate > arrays. > > Timing[ > mr = 350; > mt = 350; > xar = Table[((ir - 1.)/(mr - 1.))*Cos[Pi*((it - 1.)/(mt - 1.))], > {it, 1, mt}, {ir, 1, mr}]; > yar = Table[((ir - 1.)/(mr - 1.))*Sin[Pi*((it - 1.)/(mt - 1.))], > {it, 1, mt}, {ir, 1, mr}]; > ] > > In v6.0 it took > Out[3]= {2.312, Null} > In v5.2 it took > {0.281 Second, Null} > > Which is an order of magnitude difference, but hold on. > Now let's plot the mesh by simply constructing table > of edges of all the cells (I am aware that the algorithm > below is very unoptimized and can be made faster etc. etc. > It was not my intention to discuss here what should be the > fastest algorithm to plot a 2-d mesh, > nor was it my intention to debate the issue why one > would need to plot such a large mesh in the first place..., > but rather to compare the execution time for an IDENTICAL > code on v6.0 and v5.2. and get some confirmation/explanation > of such a suspiciously slow execution speed!).: > > Timing[ > Show[ > Graphics[{Hue[0.7], AbsoluteThickness[0.1], > Table[{Line[{{xar[[it,ir]], yar[[it,ir]]}, > {xar[[it,ir + 1]],yar[[it,ir + 1]]}, > {xar[[it + 1,ir + 1]], yar[[it + 1,ir + 1]]}, > {xar[[it + 1,ir]], yar[[it + 1,ir]]}}]}, > {ir, 1, mr - 1}, {it, 1, mt - 1}] > }], > PlotRange -> {{-1, 1}, {0, 1}}, AspectRatio -> 1/2, Axes -> True, > DisplayFunction -> $DisplayFunction, ImageSize -> 800]] > > While the timing as, it is returned by the Timing[] function, > is smaller in the v6.0: > {1.703, <Here goes the actual graphics>} > vs. > {2.094 Second, -Graphics-} > in v5.2 > > > The actual cell evaluation time in v.6.0 is 124.11 seconds > vs. 2.22 seconds in v 5.2. ???!!!!!!! > > Could anybody please confirm this. Also it would be helpful > if someone from Wolfram Research would explain if > that is intended (unavoidable) by design or maybe > a simple setting (which I am unaware of) or a future patch > will be able to fix it. > > Also, it is horribly slow to resize the above graphics > in v5.2 you just grab the corned and drag. In v6.0 you > must do it 10-100 times slower (is it possible > that I just have a very poor graphics card?). > > > Thanks, > Alex Shvydky -- ========================================================== Curtis Osterhoudt cfo at remove_this.lanl.and_this.gov PGP Key ID: 0x4DCA2A10 Please avoid sending me Word or PowerPoint attachments See http://www.gnu.org/philosophy/no-word-attachments.html ==========================================================

**References**:**Slow Show/Graphics in v6.0***From:*Alex Shvydky <ashv@lle.rochester.edu>