Yeah Hank!  Nice responses.  I agree that there is a tradeoff 
between performance and value.  Used sparingly, bitmap filters can 
come in handy.  Like if you wanted to apply a dropshadow to the 
title text of a panel.  This isn't possible in Flex using stock 
CSS.  So if this is a desired style, you have to get creative.  I 
can live with the 1/20 of a second cost here.  In fact, I'm 
currently doing just that and haven't noticed any difference.  
Hopefully we can all agree that if you eat ice cream responsibly, 
you won't gain that much weight.

-TH

--- In flexcoders@yahoogroups.com, "hank williams" <[EMAIL PROTECTED]> 
wrote:
>
> On 6/30/06, Michael Schmalle <[EMAIL PROTECTED] > wrote:
> >
> >  Hi Tim,
> >
> > Vectors will always be faster than bitmap caching in the Flash 
player.
> >
> 
> 
> This is not true. It just depends on what you are drawing. Flash 8 
achieved
> huge performance gains by caching bitmaps instead of drawing 
stuff, where
> the drawings required lots of calls. That was the *PURPOSE* of 
bitmap
> caching. They wanted to increase performance of the player. Why do 
you think
> the introduced it - to slow performance down?! The point here is 
that
> vectors *can* be faster, but so can bitmaps. It just depends. 
Filter
> performance is primarily driven by memory bandwidth issues. In 
other words
> there is a fixed amount of time it takes to create a bitmap and 
move it onto
> or off the display. This varies by platform, for example I believe 
that on
> the Mac, flash uses openGL which uses hardware acceleration for 
these
> things. In any case, the larger the bitmap the more information 
must be
> moved. This must be compared against the performance of the 
underlying
> actionscript code.
> 
> 
> It has nothing to do with Flex really. If you are doing the things 
that Flex
> > is doing, try and use vectors and custom skins and not bitmap 
filters.
> >
> > See the thing is, Flex is all about recursion. You think just 
becasue
> > there is no fancy math in a container, there are not some insane 
calcs going
> > on? When a container measures itself it calls measure on 
EVERYONE of it's
> > children, there is hardcore math going on.
> >
> 
> Floating point processors do  this kind of math  in a single 
instruction
> cycle i.e. approx 10^-9 of a second. Any potential performance 
issues around
> flex, bitmaps and filtering have *nothing* to do with math. You 
mentioned
> something in your other email about things being exponential 
because the
> algorithm is recursive. But this is a missunderstanding of the 
mathematical
> implication of recursion. There is nothing exponential going on.
> Hierarchical tree, yes.Exponential, no. It is a simple order n 
problem not
> even n log n. As explained above the problem is memory bandwidth 
not math.
> The filter has to be copied into a buffer modified, and replaced. 
This is
> more expensive if done over a large area and repeatedly.
> 
> Where BitmapFilters fit into the equation is, every frame it's 
taking a
> > snapshot, this just adds to the tremendous load at render time 
each
> > framepass.
> >
> 
> 
> I am not sure what you are trying to imply here, but, just to be 
clear
> bitmaps are built once, when the screen is constructed.This 
generally means,
> if a screen is static (as flex screens generally are) this all 
happens at
> the initial render. Which still, can be slower, but only at 
initial render.
> This kind of stuff is rarely noticable in an app type environment 
where
> there is just not that much going on. Access to the server and 
loading the
> flex swf will have much more of an effect on performance than 
rendering
> time.
> 
>  Tim, as I said it's like "Can I eat Ice cream all the time, no 
you are
> > going to get fat", same thing applies here. You can use bitmap 
filters
> > whenever you want but, you ARE going to get fat!
> >
> 
> To michaels larger point that filters are bad, I think you cannot 
make the
> kind of blanket statement he makes. I would agree that it would 
not be wise
> for adobe to build the entire component system on filters and to 
apply all
> styling with filters. This would be a lot of square inches of 
bitmap
> creation that would be un-necessary. However, I do not think that 
its
> appropriate to say that filters are never a good solution or that 
you are
> guaranteed to have a slow app. In most circumstances applying a 
filter to a
> movieclip is totally un-noticable. To achieve a noticable effect 
you would
> have to do it a lot. On the other end of the spectrum if you 
create a
> component which you use in dozens of places *perhaps* it would 
effect
> performance in a way that would be noticeable. I would be curious 
to see
> where the actual line is between noticable and un-noticable. But 
the point
> is there *is* a line. It is not a given that using filters = slow 
user
> experience. More importantly, creating a whole skin is *far* more
> complicated than applying a filter. In the real world  the time 
value of
> money is such that spending days designing a skin where you could 
apply a
> filter  in a few minutes to save1/20 of a second when constructing 
a screen
> seems like not much of a choice at all.
> 
> The bottom line is filters were introduced because they do things 
that
> either cant be done or are too complex to do manually. IMHO to 
suggest never
> to use them in Flex, to me, is not good strategy.
> 
> Regards
> Hank
> 
> Peace, Mike
> >
> >
> > On 6/30/06, Tim Hoff < [EMAIL PROTECTED]> wrote:
> > >
> > >    Ok, since this is still going. :)
> > >
> > > Mike, would you also apply the same reasoning for using 
filters on
> > > symbols, text and images, in Flash 8? Or, is a Flex swf 
different?
> > >
> > > -TH
> > >
> > > --- In flexcoders@yahoogroups.com <flexcoders%
40yahoogroups.com>,
> > > "Michael Schmalle"
> > >
> > > <teoti.graphix@> wrote:
> > > >
> > > > hehe,
> > > >
> > > > I just have to keep replying to this because I am bored.
> > > >
> > > > Fancy math; I don't know what you consider fancy math but, 
since
> > > you 'know'
> > > > what I am talking about.. you have also looked into the AS3 
class
> > > Flex
> > > > right? You see those loops, there is fancy math, just 
becasue it
> > > dosn't have
> > > > a bitwise operator in it dosn't mean it's not fancy Math,
> > > Exponentialy
> > > > multiply those loops with all containers in your app, then 
add
> > > bitmap
> > > > cahcing, you will soon see when they decided to use the 
native
> > > vecotrs over
> > > > bitmap filters.
> > > >
> > > > done
> > > >
> > > > Peace, Mike
> > > >
> > > > On 6/30/06, Michael Schmalle <teoti.graphix@> wrote:
> > > > >
> > > > > By the way, when I am talking about math, I am also 
speaking of
> > > the
> > > > > Players bitmap caching alogorithms(fancy math)... I hope 
you get
> > > your
> > > > > question answered.
> > > > >
> > > > > Peace, Mike
> > > > >
> > > > > On 6/30/06, Michael Schmalle <teoti.graphix@> wrote:
> > > > > >
> > > > > > Ok, well I heard it from the engineers mouth right in 
front of
> > > my face.
> > > > > > So, I hope an engineer tells you instead of me.
> > > > > >
> > > > > > Peace, Mike
> > > > > >
> > > > > >
> > > > > > On 6/30/06, hank williams < hank777@> wrote:
> > > > > > >
> > > > > > > That may have been their reasoning (I'd like to hear it
> > > from them)
> > > > > > > but I dont buy that the logic (not really much math)
> > > involved in calculating
> > > > > > > container positioning would interact with filters 
much. By
> > > any reasonable
> > > > > > > measure, there is not much fancy math in flex. And the
> > > logic, while cool, is
> > > > > > > not exactly taxing to the cpu, particularly in the new 
10x
> > > VM.
> > > > > > >
> > > > > > > Hank
> > > > > > >
> > > > > > > On 6/30/06, Michael Schmalle <teoti.graphix@> wrote:
> > > > > > >
> > > > > > > > Ha,
> > > > > > > >
> > > > > > > > The only reason they 'don't' use this stuff for 
containers
> > > is the
> > > > > > > > layout algos and they wanted to squeeze every bit of
> > > performance from the
> > > > > > > > player when rendering the containers.
> > > > > > > >
> > > > > > > > You have to look at it this way, containers are 
Flex, they
> > > hold
> > > > > > > > everything and having filters on these things would 
slow
> > > down the players
> > > > > > > > rendering.
> > > > > > > >
> > > > > > > > Use them for animation, Flex containers are not 
animation
> > > they are
> > > > > > > > logical mass amounts of mathematical checks and 
balances.
> > > You want every bit
> > > > > > > > of cpu power to make it look like os containers.
> > > > > > > >
> > > > > > > > Peace, Mike
> > > > > > > >
> > > > > > > > On 6/30/06, Tim Hoff < TimHoff@> wrote:
> > > > > > > >
> > > > > > > > > Thanks for the tip Mike. Without digging into the
> > > API's, for
> > > > > > > > > what
> > > > > > > > > appears to be something simple (like this), 
there's no
> > > way for the
> > > > > > > > >
> > > > > > > > > average developer to know these things.
> > > > > > > > >
> > > > > > > > > -TH
> > > > > > > > >
> > > > > > > > > --- In flexcoders@yahoogroups.com<flexcoders%
40yahoogroups.com><flexcoders%
> > > 40yahoogroups.com>,
> > >
> > > > > > > > > "hank williams" <hank777@>
> > > > > > > > >
> > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > Hmm...
> > > > > > > > > >
> > > > > > > > > > Doesnt make much sense. They encourage using 
filters
> > > in flash
> > > > > > > > > for
> > > > > > > > > animation
> > > > > > > > > > and effects but its too slow for a static flex
> > > container?
> > > > > > > > > >
> > > > > > > > > > It seems to me if performance is an issue flex 
is the
> > > last place
> > > > > > > > >
> > > > > > > > > that that
> > > > > > > > > > would be of concern since there is little 
animation. I
> > > dont get
> > > > > > > > > how this
> > > > > > > > > > would be a serious impediment for most flex 
users.
> > > > > > > > > >
> > > > > > > > > > Hank
> > > > > > > > > >
> > > > > > > > > > On 6/30/06, Michael Schmalle <teoti.graphix@> 
wrote:
> > > > > > > > > > >
> > > > > > > > > > > > The following method gives you a little more
> > > control over
> > > > > > > > > drop
> > > > > > > > > shadow
> > > > > > > > > > > than the shadow style properties
> > > > > > > > > > >
> > > > > > > > > > > There is a reason they didn't use the 
DropShadow
> > > filter for
> > > > > > > > > panels and
> > > > > > > > > > > containers. It is VERY expensive on 
processing. If
> > > you are not
> > > > > > > > >
> > > > > > > > > worried about
> > > > > > > > > > > that then it dosn't matter.
> > > > > > > > > > >
> > > > > > > > > > > That is why the dropShadow style is actually a
> > > programmatic
> > > > > > > > > skin
> > > > > > > > > shape.
> > > > > > > > > > >
> > > > > > > > > > > Peace, Mike
> > > > > > > > > > >
> > > > > > > > > > > On 6/30/06, hank williams <hank777@> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Thanks Tim. That is EXACTLY what I was 
looking
> > > for. That is
> > > > > > > > > so cool.
> > > > > > > > > > > >
> > > > > > > > > > > > Hank
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > On 6/30/06, Tim Hoff <TimHoff@ > wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > Hi Hank,
> > > > > > > > > > > > >
> > > > > > > > > > > > > You can use any of the available Flash 
filters,
> > > for simple
> > > > > > > > > > > > > control/container skinning, by setting the
> > > filters
> > > > > > > > > property. The
> > > > > > > > > > > > > following method gives you a little more 
control
> > > over drop
> > > > > > > > >
> > > > > > > > > shadow than the
> > > > > > > > > > > > > shadow style properties. Check the docs 
for the
> > > syntax of
> > > > > > > > > the other
> > > > > > > > > > > > > available filters.
> > > > > > > > > > > > >
> > > > > > > > > > > > > -TH
> > > > > > > > > > > > >
> > > > > > > > > > > > > <mx:Script>
> > > > > > > > > > > > > <![CDATA[
> > > > > > > > > > > > >
> > > > > > > > > > > > > import flash.filters.*;
> > > > > > > > > > > > > private var dropShadowFilter:Array=new 
Array(new
> > > > > > > > > > > > > DropShadowFilter(3,45,0x000000,.6));
> > > > > > > > > > > > >
> > > > > > > > > > > > > ]]>
> > > > > > > > > > > > > </mx:Script>
> > > > > > > > > > > > >
> > > > > > > > > > > > > <mx:Panel filters="{dropShadowFilter}"/>
> > > > > > > > > > > > >
> > > > > > > > > > > > > --- In 
flexcoders@yahoogroups.com<flexcoders%40yahoogroups.com>
> > > <flexcoders%
> > > 40yahoogroups.com>,
> > >
> > > > > > > > > "Michael Schmalle"
> > > > > > > > > <teoti.graphix@>
> > > > > > > > > > > > > wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > I would sayif you know what you are going
> > > after,
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > EVERYTHING in Flex can be skinned with 
your
> > > custom
> > > > > > > > > styles
> > > > > > > > > and
> > > > > > > > > > > > > layers.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Make custom skin sets. If you read what 
Adobe
> > > has said
> > > > > > > > > quite a bit,
> > > > > > > > > > > > > they
> > > > > > > > > > > > > > designed these components for 
extensibility
> > > and thus,
> > > > > > > > > some
> > > > > > > > > things
> > > > > > > > > > > > > are not
> > > > > > > > > > > > > > implemented and are left up to the 
developer
> > > to extend.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Which when you get deeper into the years 
with
> > > Flex, you
> > > > > > > > > will thank
> > > > > > > > > > > > > Adobe for
> > > > > > > > > > > > > > taking that path.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Peace, Mike
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > On 6/30/06, hank williams hank777@ wrote:
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > when applying shadowing to an object, 
if the
> > > lighting
> > > > > > > > > source is to
> > > > > > > > > > > > > the
> > > > > > > > > > > > > > > top left of the object, then the 
shadow will
> > > be on the
> > > > > > > > >
> > > > > > > > > bottom and
> > > > > > > > > > > > > the
> > > > > > > > > > > > > > > right. Typically there is also a white 
or
> > > light band
> > > > > > > > > across the
> > > > > > > > > > > > > top
> > > > > > > > > > > > > > > and down the left side.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > I am wondering how you do this in 
flex. I
> > > see it in
> > > > > > > > > the
> > > > > > > > > > > > > application
> > > > > > > > > > > > > > > bar and so I am thinking that I should 
be
> > > able to
> > > > > > > > > style
> > > > > > > > > a canvas
> > > > > > > > > > > > > to do
> > > > > > > > > > > > > > > it, but I cant seem to do it with the 
shadow
> > > related
> > > > > > > > > settings. I
> > > > > > > > > > > > > > > believe I was able to do this kind of 
things
> > > with
> > > > > > > > > movie
> > > > > > > > > clips in
> > > > > > > > > > > > > > > flash.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > I guess a second question is whether 
it is
> > > possible to
> > > > > > > > >
> > > > > > > > > do any of
> > > > > > > > > > > > > those
> > > > > > > > > > > > > > > cool flash 8 effects on 
containers/canvases
> > > in flex.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Hank
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > --
> > > > > > > > > > > > > > What goes up, does come down.
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > > What goes up, does come down.
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > >
> > > > > > > > What goes up, does come down.
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > >
> > > > > > What goes up, does come down.
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > >
> > > > > What goes up, does come down.
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > What goes up, does come down.
> > > >
> > >
> > >
> >
> >
> > --
> > What goes up, does come down. 
> >
>







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to