Revolution is very slow to refresh fields. How can I speed it up?

Eric Colvin EricMColvin at telus.net
Wed Mar 29 20:12:00 EST 2006


I¹ve just started playing with Revolution ­ having been a passionate
enthusiast for Hypercard in a previous life.

One thing I¹ve hit upon early on that annoys me a little.  Though Revolution
is far newer, and loads into memory rather than writing to disk, it is still
way slower at certain things ­ such as refreshing text fields ­ than
Hypercard ever was.

I wrote the following counting routine (as a speed test to measure the
difference between writing to a variable and writing to a field).  However,
what I learned was that ­ on my computer, at any rate ­ Revolution only
refreshes its text fields slightly more than once a second. When I run the
same script on Hypercard, the counting field whirs through changes faster
than a gas pump - with every new number registered on screen.  Revolution
only shows me about one figure in every twenty five or so ­ despite the fact
that the routine tells the field to display every consecutive number from 1
to 300.

Just add this script to a locked text field, and click on it, to see what
I¹m talking about:

on mouseup
  -- COUNT TO 300
  put the ticks into startTime
  repeat with i = 1 to 300
    put 1 + line 1 of me into line 1 of me
  end repeat
  put the ticks - starttime into stopTime1
  put stopTime1 into word 1 of line 3 of me
  put the ticks into startTime
  put me into testVar
  
  -- NOW JUST SHOW MULTIPLES OF TEN
  repeat with i = 1 to 300
    put 1 + line 2 of testVar into line 2 of testVar
    if i mod 10 = 0 then put line 2 of testVar into line 2 of me
  end repeat
  put line 2 of testVar into line 2 of me
  put the ticks - startTime into stopTime2
  put stopTime1 & " : " & stopTime2 into line 3 of me
end mouseup

Is there any way I can persuade the field to refresh more frequently and
count like the gas pump?

Thanks,



Eric Colvin



More information about the use-livecode mailing list