Custom Control performance with a backgroundPattern

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Howlernator
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 18
Joined: Wed Oct 13, 2010 4:44 am

Custom Control performance with a backgroundPattern

Post by Howlernator » Wed Apr 13, 2011 8:45 am

Hiya Gang,

scenario:

stack at 1024 x 768 with a number of cards.

cards contain a number of custom controls for user. (multimedia app)

when using a 1024 x 768 imported background image file (around 800k... pre-optimised) as the 'backgroundPattern' for the stack / card, all the custom controls are sluggish at best, sometimes, disfunctional.

when using the SAME image simply placed on the card in question at layer 1 or 'back' everything works fine.

Current workaround is to insert the background image as the image of a BUTTON into the global nav grp that I have, which simply gets displayed on each required screen, without creating multiple instances of the large background image data.

The problem does NOT occur when SMALLER graphics are loaded as the backgroundPattern on the card / stack.

I'm guessing there's some weird memory management stuff going on with teh BackgroundPattern function and the larger file?

Thoughts?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Custom Control performance with a backgroundPattern

Post by FourthWorld » Wed Apr 13, 2011 2:25 pm

It may help to set the alwaysBuffer property of the image to true.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply