Browsing cards manually is slow

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Alexandre
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 2
Joined: Mon Nov 23, 2009 7:59 am

Browsing cards manually is slow

Post by Alexandre » Mon Nov 23, 2009 10:45 am

Hello!

I am having the following situation with RunRev 3.5 or 4.0 on Windows XP or Vista, with a fairly large stack (22MB) with 2000+ cards, where almost every card has a picture:

When I use simple code to go back and forward cards in the stack, no issue, extremely fast screen redraw. As soon as the code stops and I need to browse cards manually with [CTRL][2] or [CTRL][3], there is a delay of 1 or 2 seconds before the new card is displayed.
This isn't happening on smaller stacks, and did not happen with RunRev Studio 2.X, so I'm sensing a pattern here :?

Anyone has any idea?
Thanks!
Alexandre

oliverk
Site Admin
Site Admin
Posts: 53
Joined: Mon Feb 27, 2006 2:16 pm

Re: Browsing cards manually is slow

Post by oliverk » Mon Nov 23, 2009 5:47 pm

Hi Alexandre,

I recently spent some time investigating a similar issue for someone.

The excessive slowdown here is caused by an inefficiency in a component of the Revolution IDE. This effects most keyboard shortcuts and also the opening of the main IDE menus. We recently changed the slow code to use a much faster engine implementation that should mostly eliminate this delay.

The fix will be available in the next version of Revolution, but if you want, I can send you a patch that to apply it directly into version 4.0 (this is only possible in revStudio or revEnterprise). Send me a private message if you want to try this.

I would also say that 2000 cards on a stack sounds like quite a lot, do you have a very complex application? Maybe it would be possible to refactor the application using behaviors or other abstractions to use a much smaller number of cards? Its pretty inevitable that having such a large number of cards will cause some things in the IDE to be sluggish, and more importantly it might cause some serious issues for maintaining your code.

Hope this helps.
Regards
Oliver
Oliver Kenyon
Software Developer
Runtime Revolution

Alexandre
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 2
Joined: Mon Nov 23, 2009 7:59 am

Re: Browsing cards manually is slow

Post by Alexandre » Tue Nov 24, 2009 6:42 am

Hello Oliver!
I'll happily test the patch for you (I'll contact you directly). About the size of the stack, well, yes, I can understand your comment but the code itself is fairly simple, it is just going from card to card, with very little interaction... :wink:
Thanks
Alexandre

Post Reply