Speed of RR vs SuperCard

Richard Gaskin ambassador at fourthworld.com
Fri Apr 11 17:32:02 EDT 2003


livfoss at blueyonder.co.uk wrote:

> Thanks to Richard and Ken who replied to my queries on this subject (Revo app
> runs 'like treacle' on pre-G3 Mac). I found all these comments helpful and am
> pursuing various lines. However, having talked to my tester, I find that there
> are two clear areas of 'treacle'. One is my quit sequence, where I close all
> my substacks and then execute a 'quit' command. This takes several seconds on
> my 133MHz G3 PowerBook running MacOS 9.2.2, and a lot longer on my tester's
> machine. Maybe I shouldn't have closed the individual stacks, but even so I
> can't see what's causing this. What the user actually sees is that the windows
> of the app all close, but the icon representing the app remains in the Mac's
> menu bar for a long time after this. This could be a coding error, but I
> haven't found it yet.

MC and WebMerge (which is based on MC) both quit instantly, taking less than
half a second to go away.

What is your program doing on closeCard/closeStack/quit?

> The second one is to do with QuickTime movies, and I certainly see performance
> problems on relatively fast machines - indeed I have mentioned this before on
> the list but haven't yet got a good solution.
> 
> I have movies in player objects with scripts that allow the objects to be
> moved around the screen when the movie isn't playing. The script for the move
> is just
> 
> on mouseDown
> stop player "mymovie"
> grab me
> end mouseDown
> 
> The player is unbuffered (the 'buffer' checkmark is off), because that's the
> only way I can get the visible object to act like a transparent GIF; if it's
> buffered it moves a lot more smoothly, but it always looks like a rectangle
> regardless of my transparency and masking settings. This is a really tough
> one, and I hope it will improve in 2.0. Meanwhile I am arranging to have the
> user drag an image of the movie's title frame rather than a player object, and
> just move the (invisible) player to the final destination and show it instead
> of the image only when it starts playing, but I'm scared there will be a delay
> in moving the player object invisibly and in starting it - I'm about to find
> out.

QT is an event loop hog, widely known for requiring the majority of
processor cycles while active.  If you think about what it needs to do under
the hood (parsing the file to grab a frame, decompress the frame, display
the frame -- a dozen or two dozen times every second, all while handing off
the event cue to the host application, the OS, and any other open program),
it's easy to appreciate what it's going through.

Have you been able to perform the same action in any other scripting tool?

I can't think of a tool that can dynamically mask QT while it's playing and
allow drag it around on the screen.  Maybe with the G5 and a lot of RAM, but
I'd be surprised to see that done gracefully even in a more formal language.

Your approach in hiding and showing the player seems optimal.

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge 2.2: Publish any database on any site
 ___________________________________________________________
 Ambassador at FourthWorld.com       http://www.FourthWorld.com
 Tel: 323-225-3717                       AIM: FourthWorldInc




More information about the use-livecode mailing list