MathGroup Archive 1999

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

Search the Archive

Re: Slow Version 4 Front End

  • To: mathgroup at smc.vnet.net
  • Subject: [mg18847] Re: Slow Version 4 Front End
  • From: jenningsj at mail.utexas.edu (Jim Jennings)
  • Date: Thu, 22 Jul 1999 22:57:46 -0400
  • Organization: The University of Texas at Austin
  • References: <7mp3gt$l9b@smc.vnet.net> <7n4mr6$30a$3@dragonfly.wolfram.com>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <7n4mr6$30a$3 at dragonfly.wolfram.com>, bruck at math.usc.edu
(Ronald Bruck) wrote:

>In article <7mp3gt$l9b at smc.vnet.net>, Bob Stagat <stagat at mrcsb.com> wrote:

[snip]

>> With Mathematica 4, evaluating a cell takes an absolute minimum of about
>> 4.2 seconds of wall clock time, as indicated by the Front End's
>> "ShowTiming" function.

[snip]

I have noticed the same thing, but I can't find this Front End
"ShowTiming" function to document it.  Can you tell me where to set this
option Bob?  I didn't find it in the option inspector, but perhaps that is
the wrong place to look.  Below, I document the problem in a different
way.

>> Why is the version 4 Front End so abysmally slow in communicating with
>> the kernel? What in the world is consuming this 4+ seconds of overhead on
>> every single thing I evaluate? Are there any options I can set to
>> eliminate these inordinate delays? I know it doesn't have to be so,
>> because version 3 never exhibited this frustrating behavior.

I have the same questions.

>I would say you have it misconfigured somehow.  I don't find this problem
>in Windows, Linux or MacOS.

I hope you are right Ron, then maybe you can help me fix it.  However, you
might missunderstand the issue...

>On the MacOS, I tried it on both a 400MHz B&W G3 and a 266MHz Gray G3.  I
>get 0. Second for simple additions, on both platforms.  This is using
>MacOS 8.6, with the Standard Install.

Your quote of "0. Second", formatted the same way as output from Timing[],
makes me suspicious that you are talking about CPU time in the Kernel, not
total clock time including communication with the Front End and Front End
formatting of output, etc., as Bob & I are concerned with.

To check this out I set up the following simple notebook (the timings
depend alot on how you run it, so be sure to read to the end of this
posting or you will miss the punch line):

-------------------------

In[41]:=
clockDelta := Block[{}, t1 = SessionTime[]; dt = t1 - t0; t0 = t1; dt]

In[42]:=
t0 = SessionTime[]

Out[42]=
1207.

In[43]:=
Timing[clockDelta]

Out[43]=
{0. Second, 0.}

In[44]:=
Timing[clockDelta]

Out[44]=
{0. Second, 0.}

In[45]:=
Timing[clockDelta]

Out[45]=
{0. Second, 0.}

In[46]:=
Timing[clockDelta]

Out[46]=
{0. Second, 0.}

In[47]:=
Timing[clockDelta]

Out[47]=
{0. Second, 0.}

-------------------------

The symbol "clockDelta" just returns the delta clock time, in seconds,
since the last evaluation of clockDelta, or since the symbol t0 was
reset.  I then evaluate clockDelta multiple times inside of Timing[] to
report the Kernel CPU time as well.  As you can see both the Kernel CPU
time and the clock time are very small for evaluation of clockDelta.

However, what you see above was evaluated "all at once"  I selected all
the cells at once and hit the enter key.  If I evaluate the cells one at a
time I get a very different result:

-------------------------

In[48]:=
clockDelta := Block[{}, t1 = SessionTime[]; dt = t1 - t0; t0 = t1; dt]

In[49]:=
t0 = SessionTime[]

Out[49]=
3251.

In[50]:=
Timing[clockDelta]

Out[50]=
{0. Second, 5.}

In[51]:=
Timing[clockDelta]

Out[51]=
{0. Second, 5.}

In[52]:=
Timing[clockDelta]

Out[52]=
{0. Second, 5.}

In[53]:=
Timing[clockDelta]

Out[53]=
{0. Second, 5.}

In[54]:=
Timing[clockDelta]

Out[54]=
{0. Second, 5.}

-------------------------

The Kernel CPU time is still very small, but I nevertheless have to wait 5
seconds for "something" to happen each time.

I did this experiment by clicking in a cell, hitting enter, waiting for it
to finish evaluating, then clicking in the next cell & hitting enter,
etc.  Thus, I am measuring my reaction time in addition to everything
else.  Nevertheless, I think my reaction time, even at my age, is much
better than 5 seconds :-)

I noticed this occasionally with version 3, but it only happened
occasionally & it didn't bother me much.  I assumed that the Front End was
taking time out to do some memory management or something.  But in version
4 the 5 second delay happens *every time* a cell or group of cells is
evaluated.  It is driving me nuts and it is forcing me to change my habits
in Mathematica.  I now try to compose more cells and evaluate them at
once.  It's more work; I have to think ahead ;-)

I hope someone can help me fix this & thus save more of my old brain cells
for real research & less of them for thinking ahead in Mathematica.

I am running on a PowerMac 8100/100 with a 240 Mhz G3 upgrade card.  My
Front End is set to 20 MB and my Kernel is set to 40 MB.

-- 
Jim Jennings                                
Research Associate              jenningsj at mail.utexas.edu
Bureau of Economic Geology      (512) 471-4364 (voice)
University of Texas at Austin   (512) 471-0140 (fax)


  • Prev by Date: Re: Exporting PRINT results from Mathematica to other applications
  • Next by Date: Re: out of memory reading large(?) file (Q:)
  • Previous by thread: Re: Slow Version 4 Front End
  • Next by thread: Re: Re: Slow Version 4 Front End