[Flashcoders] Slow performance

2006-09-03 Thread kariminal
Hello All...

My flash movie fills the whole browser window. If the window is kept small
performance is great, however when I maximize the browser everything slows
down. This is a simple effect which I think should run at a good speed
regardless. I've uploaded a sample here: http://www.kurst.co.uk/transfer/

And the animation code is as follows:

//CODE

private function stopAnimation( ):Void{

clearInterval( animationIID );

}
private function restartAnimation( ):Void{

stopAnimation();
animationIID = setInterval( this, "animationLoop" , 10 );

}
private function animationLoop( ):Void{


// make sure we always keep the counter within the length of
the array
if ( lineCounter > code_lines.length ) lineCounter = 2

// print the text
if ( lineCounter == 0 ) {

field_txt.text = code_lines[lineCounter] 

} else { field_txt.text = field_txt.text +
code_lines[lineCounter] }

// ready counter for the next line

lineCounter ++

if (field_txt.maxscroll > 1 ){


pageCounter ++;
field_txt.text = "";
stopAnimation();
clearInterval( clearIID );
clearIID = setInterval( this, "restartAnimation" ,
clearIntervalTime );

}


}

//CODE


And I've also uploaded a copy of the whole class here
http://www.kurst.co.uk/transfer/textComponent.as
Any tips on optimizing this one are welcome... 


Regards




Karim




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Slow performance

2006-09-03 Thread Hans Wichman

Hi,
setInterval each 10ms might be a bit overkill.
grtz
JC


On 9/3/06, kariminal <[EMAIL PROTECTED]> wrote:


Hello All...

My flash movie fills the whole browser window. If the window is kept small
performance is great, however when I maximize the browser everything slows
down. This is a simple effect which I think should run at a good speed
regardless. I've uploaded a sample here: http://www.kurst.co.uk/transfer/

And the animation code is as follows:

//CODE

   private function stopAnimation( ):Void{

   clearInterval( animationIID );

   }
   private function restartAnimation( ):Void{

   stopAnimation();
   animationIID = setInterval( this, "animationLoop" , 10 );

   }
   private function animationLoop( ):Void{


   // make sure we always keep the counter within the length
of
the array
   if ( lineCounter > code_lines.length ) lineCounter = 2

   // print the text
   if ( lineCounter == 0 ) {

   field_txt.text = code_lines[lineCounter]

   } else { field_txt.text = field_txt.text +
code_lines[lineCounter] }

   // ready counter for the next line

   lineCounter ++

   if (field_txt.maxscroll > 1 ){


   pageCounter ++;
   field_txt.text = "";
   stopAnimation();
   clearInterval( clearIID );
   clearIID = setInterval( this, "restartAnimation" ,
clearIntervalTime );

   }


   }

//CODE


And I've also uploaded a copy of the whole class here
http://www.kurst.co.uk/transfer/textComponent.as
Any tips on optimizing this one are welcome...


Regards




Karim




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Slow performance

2006-09-03 Thread Marc Hoffman
I'm seeing a window full of text (Firefox, Win XP Pro) -- is this 
what you intended? If so, that's a HUGE number of vectors to redraw 
so rapidly. Furthermore, by using a serif font you're probably 
doubling or tripling the number of vectors, so try the simplest, 
non-serif, mono-stroke (consistent stroke thickness) font you can, 
such as Verdana. And of course lengthen the redraw interval.


Marc

At 12:24 PM 9/3/2006, you wrote:

Hi,
setInterval each 10ms might be a bit overkill.
grtz
JC


On 9/3/06, kariminal <[EMAIL PROTECTED]> wrote:


Hello All...

My flash movie fills the whole browser window. If the window is kept small
performance is great, however when I maximize the browser everything slows
down. This is a simple effect which I think should run at a good speed
regardless. I've uploaded a sample here: http://www.kurst.co.uk/transfer/

And the animation code is as follows:

//CODE

   private function stopAnimation( ):Void{

   clearInterval( animationIID );

   }
   private function restartAnimation( ):Void{

   stopAnimation();
   animationIID = setInterval( this, "animationLoop" , 10 );

   }
   private function animationLoop( ):Void{


   // make sure we always keep the counter within the length
of
the array
   if ( lineCounter > code_lines.length ) lineCounter = 2

   // print the text
   if ( lineCounter == 0 ) {

   field_txt.text = code_lines[lineCounter]

   } else { field_txt.text = field_txt.text +
code_lines[lineCounter] }

   // ready counter for the next line

   lineCounter ++

   if (field_txt.maxscroll > 1 ){


   pageCounter ++;
   field_txt.text = "";
   stopAnimation();
   clearInterval( clearIID );
   clearIID = setInterval( this, "restartAnimation" ,
clearIntervalTime );

   }


   }

//CODE


And I've also uploaded a copy of the whole class here
http://www.kurst.co.uk/transfer/textComponent.as
Any tips on optimizing this one are welcome...


Regards




Karim




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Slow performance

2006-09-04 Thread Dan Rogers
If you're looking to improve performance and keep the speed of your  
animation, you could experiment with BitmapData.draw() and render a  
bitmap copy of a hidden text movieclip.  I think the bottleneck is  
mostly due to the heavy font vectors.  If your font movieclip was  
hidden and/or moved off-stage, you could probably get away with a  
single BitmapData object set to the size of the screen, redrawing  
each time the text changes.


-Danro


On Sep 3, 2006, at 1:19 PM, Marc Hoffman wrote:

I'm seeing a window full of text (Firefox, Win XP Pro) -- is this  
what you intended? If so, that's a HUGE number of vectors to redraw  
so rapidly. Furthermore, by using a serif font you're probably  
doubling or tripling the number of vectors, so try the simplest,  
non-serif, mono-stroke (consistent stroke thickness) font you can,  
such as Verdana. And of course lengthen the redraw interval.


Marc

At 12:24 PM 9/3/2006, you wrote:

Hi,
setInterval each 10ms might be a bit overkill.
grtz
JC


On 9/3/06, kariminal <[EMAIL PROTECTED]> wrote:


Hello All...

My flash movie fills the whole browser window. If the window is  
kept small
performance is great, however when I maximize the browser  
everything slows
down. This is a simple effect which I think should run at a good  
speed
regardless. I've uploaded a sample here: http://www.kurst.co.uk/ 
transfer/


And the animation code is as follows:

//CODE

   private function stopAnimation( ):Void{

   clearInterval( animationIID );

   }
   private function restartAnimation( ):Void{

   stopAnimation();
   animationIID = setInterval( this,  
"animationLoop" , 10 );


   }
   private function animationLoop( ):Void{


   // make sure we always keep the counter within the  
length

of
the array
   if ( lineCounter > code_lines.length ) lineCounter  
= 2


   // print the text
   if ( lineCounter == 0 ) {

   field_txt.text = code_lines[lineCounter]

   } else { field_txt.text = field_txt.text +
code_lines[lineCounter] }

   // ready counter for the next line

   lineCounter ++

   if (field_txt.maxscroll > 1 ){


   pageCounter ++;
   field_txt.text = "";
   stopAnimation();
   clearInterval( clearIID );
   clearIID = setInterval( this,  
"restartAnimation" ,

clearIntervalTime );

   }


   }

//CODE


And I've also uploaded a copy of the whole class here
http://www.kurst.co.uk/transfer/textComponent.as
Any tips on optimizing this one are welcome...


Regards




Karim




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Slow performance

2006-09-04 Thread kariminal
pushing things to 10ms seemed to work best. I will try experiment with
BitmapData. I hope that will do the trick.

Thanks 



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dan Rogers
Sent: 04 September 2006 19:55
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Slow performance

If you're looking to improve performance and keep the speed of your
animation, you could experiment with BitmapData.draw() and render a bitmap
copy of a hidden text movieclip.  I think the bottleneck is mostly due to
the heavy font vectors.  If your font movieclip was hidden and/or moved
off-stage, you could probably get away with a single BitmapData object set
to the size of the screen, redrawing each time the text changes.

-Danro


On Sep 3, 2006, at 1:19 PM, Marc Hoffman wrote:

> I'm seeing a window full of text (Firefox, Win XP Pro) -- is this what 
> you intended? If so, that's a HUGE number of vectors to redraw so 
> rapidly. Furthermore, by using a serif font you're probably doubling 
> or tripling the number of vectors, so try the simplest, non-serif, 
> mono-stroke (consistent stroke thickness) font you can, such as 
> Verdana. And of course lengthen the redraw interval.
>
> Marc
>
> At 12:24 PM 9/3/2006, you wrote:
>> Hi,
>> setInterval each 10ms might be a bit overkill.
>> grtz
>> JC
>>
>>
>> On 9/3/06, kariminal <[EMAIL PROTECTED]> wrote:
>>>
>>> Hello All...
>>>
>>> My flash movie fills the whole browser window. If the window is kept 
>>> small performance is great, however when I maximize the browser 
>>> everything slows down. This is a simple effect which I think should 
>>> run at a good speed regardless. I've uploaded a sample here: 
>>> http://www.kurst.co.uk/ transfer/
>>>
>>> And the animation code is as follows:
>>>
>>> //CODE
>>>
>>>private function stopAnimation( ):Void{
>>>
>>>clearInterval( animationIID );
>>>
>>>}
>>>private function restartAnimation( ):Void{
>>>
>>>stopAnimation();
>>>animationIID = setInterval( this, "animationLoop" , 
>>> 10 );
>>>
>>>}
>>>private function animationLoop( ):Void{
>>>
>>>
>>>// make sure we always keep the counter within the 
>>> length of the array
>>>if ( lineCounter > code_lines.length ) lineCounter = 
>>> 2
>>>
>>>// print the text
>>>if ( lineCounter == 0 ) {
>>>
>>>field_txt.text = code_lines[lineCounter]
>>>
>>>} else { field_txt.text = field_txt.text + 
>>> code_lines[lineCounter] }
>>>
>>>// ready counter for the next line
>>>
>>>lineCounter ++
>>>
>>>if (field_txt.maxscroll > 1 ){
>>>
>>>
>>>pageCounter ++;
>>>field_txt.text = "";
>>>stopAnimation();
>>>clearInterval( clearIID );
>>>clearIID = setInterval( this, 
>>> "restartAnimation" , clearIntervalTime );
>>>
>>>}
>>>
>>>
>>>}
>>>
>>> //CODE
>>>
>>>
>>> And I've also uploaded a copy of the whole class here 
>>> http://www.kurst.co.uk/transfer/textComponent.as
>>> Any tips on optimizing this one are welcome...
>>>
>>>
>>> Regards
>>>
>>>
>>>
>>>
>>> Karim
>>>
>>>
>>>
>>>
>>> ___
>>> Flashcoders@chattyfig.figleaf.com
>>> To change your subscription options or search the archive:
>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>
>>> Brought to you by Fig Leaf Software
>>> Premier Authorized Adobe Consulting and Training 
>>> http://www.figleaf.com http://training.figleaf.com
>> ___
>> Flashcoders@chattyfig.figleaf.com
>> To change your subscription options or search the archive:
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>> Brought to you by Fig Leaf Software
>> Premier Authorized Adobe Consulting and Training 
>

RE: [Flashcoders] Slow performance

2006-09-04 Thread kariminal
Thanks for the replies so far...

I am now using BitmapData.draw() ( and source_mc._visible=false + moved
offstage ): it run a little faster than before. And only seems to choke when
the browser is maximized at higher resolution ( around 1280x1024 ), maybe I
am knit picking?... 

But, I think something is not going right in my code and that the draw loop
could be optimized. The code now looks something like this:

// code

private function animationLoop( ):Void{

if ( lineCounter > code_lines.length ) lineCounter = 2
if ( lineCounter == 0 ) {
field_txt.text = code_lines[lineCounter] 
} else { field_txt.text = field_txt.text +
code_lines[lineCounter] }

myBitmapData = new BitmapData(source_mc._width,
source_mc._height , false, 0x );
target_mc.attachBitmap(myBitmapData, 10);
myBitmapData.draw(source_mc);

lineCounter ++

}
// code

I am finding it a little odd, that I am making a new BitMapData object every
interval and tried moving it outside the loop but got strange results (due
to my ignorance): every time 'attachBitmap' ran, it seemed the old bitmap
was not being cleared. 

+ also changed the font to Verdana, tried various interval times, but
neither of these did much to improve the situation. Anyone think I can
squeeze a little more FPS out of this one?..

http://www.kurst.co.uk/transfer/2/ - Using BitmapData
http://www.kurst.co.uk/transfer/1/ - and not




 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dan Rogers
Sent: 04 September 2006 19:55
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Slow performance

If you're looking to improve performance and keep the speed of your
animation, you could experiment with BitmapData.draw() and render a bitmap
copy of a hidden text movieclip.  I think the bottleneck is mostly due to
the heavy font vectors.  If your font movieclip was hidden and/or moved
off-stage, you could probably get away with a single BitmapData object set
to the size of the screen, redrawing each time the text changes.

-Danro


On Sep 3, 2006, at 1:19 PM, Marc Hoffman wrote:

> I'm seeing a window full of text (Firefox, Win XP Pro) -- is this what 
> you intended? If so, that's a HUGE number of vectors to redraw so 
> rapidly. Furthermore, by using a serif font you're probably doubling 
> or tripling the number of vectors, so try the simplest, non-serif, 
> mono-stroke (consistent stroke thickness) font you can, such as 
> Verdana. And of course lengthen the redraw interval.
>
> Marc
>
> At 12:24 PM 9/3/2006, you wrote:
>> Hi,
>> setInterval each 10ms might be a bit overkill.
>> grtz
>> JC
>>
>>
>> On 9/3/06, kariminal <[EMAIL PROTECTED]> wrote:
>>>
>>> Hello All...
>>>
>>> My flash movie fills the whole browser window. If the window is kept 
>>> small performance is great, however when I maximize the browser 
>>> everything slows down. This is a simple effect which I think should 
>>> run at a good speed regardless. I've uploaded a sample here: 
>>> http://www.kurst.co.uk/ transfer/
>>>
>>> And the animation code is as follows:
>>>
>>> //CODE
>>>
>>>private function stopAnimation( ):Void{
>>>
>>>clearInterval( animationIID );
>>>
>>>}
>>>private function restartAnimation( ):Void{
>>>
>>>stopAnimation();
>>>animationIID = setInterval( this, "animationLoop" , 
>>> 10 );
>>>
>>>}
>>>private function animationLoop( ):Void{
>>>
>>>
>>>// make sure we always keep the counter within the 
>>> length of the array
>>>if ( lineCounter > code_lines.length ) lineCounter = 
>>> 2
>>>
>>>// print the text
>>>if ( lineCounter == 0 ) {
>>>
>>>field_txt.text = code_lines[lineCounter]
>>>
>>>} else { field_txt.text = field_txt.text + 
>>> code_lines[lineCounter] }
>>>
>>>// ready counter for the next line
>>>
>>>lineCounter ++
>>>
>>>if (field_txt.maxscroll > 1 ){
>>>
>>>
>>>pageCounter ++;
>>>field_txt.text = "";
>>>stopAnimation();
>>>

Re: [Flashcoders] Slow performance

2006-09-04 Thread Scott Hyndman

Are you ever calling dispose on the bitmap data? Because if not it
won't run for long.

Scott

On 04/09/06, kariminal <[EMAIL PROTECTED]> wrote:

Thanks for the replies so far...

I am now using BitmapData.draw() ( and source_mc._visible=false + moved
offstage ): it run a little faster than before. And only seems to choke when
the browser is maximized at higher resolution ( around 1280x1024 ), maybe I
am knit picking?...

But, I think something is not going right in my code and that the draw loop
could be optimized. The code now looks something like this:

// code

private function animationLoop( ):Void{

if ( lineCounter > code_lines.length ) lineCounter = 2
if ( lineCounter == 0 ) {
field_txt.text = code_lines[lineCounter]
} else { field_txt.text = field_txt.text +
code_lines[lineCounter] }

myBitmapData = new BitmapData(source_mc._width,
source_mc._height , false, 0x );
target_mc.attachBitmap(myBitmapData, 10);
myBitmapData.draw(source_mc);

lineCounter ++

}
// code

I am finding it a little odd, that I am making a new BitMapData object every
interval and tried moving it outside the loop but got strange results (due
to my ignorance): every time 'attachBitmap' ran, it seemed the old bitmap
was not being cleared.

+ also changed the font to Verdana, tried various interval times, but
neither of these did much to improve the situation. Anyone think I can
squeeze a little more FPS out of this one?..

http://www.kurst.co.uk/transfer/2/ - Using BitmapData
http://www.kurst.co.uk/transfer/1/ - and not







-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dan Rogers
Sent: 04 September 2006 19:55
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Slow performance

If you're looking to improve performance and keep the speed of your
animation, you could experiment with BitmapData.draw() and render a bitmap
copy of a hidden text movieclip.  I think the bottleneck is mostly due to
the heavy font vectors.  If your font movieclip was hidden and/or moved
off-stage, you could probably get away with a single BitmapData object set
to the size of the screen, redrawing each time the text changes.

-Danro


On Sep 3, 2006, at 1:19 PM, Marc Hoffman wrote:

> I'm seeing a window full of text (Firefox, Win XP Pro) -- is this what
> you intended? If so, that's a HUGE number of vectors to redraw so
> rapidly. Furthermore, by using a serif font you're probably doubling
> or tripling the number of vectors, so try the simplest, non-serif,
> mono-stroke (consistent stroke thickness) font you can, such as
> Verdana. And of course lengthen the redraw interval.
>
> Marc
>
> At 12:24 PM 9/3/2006, you wrote:
>> Hi,
>> setInterval each 10ms might be a bit overkill.
>> grtz
>> JC
>>
>>
>> On 9/3/06, kariminal <[EMAIL PROTECTED]> wrote:
>>>
>>> Hello All...
>>>
>>> My flash movie fills the whole browser window. If the window is kept
>>> small performance is great, however when I maximize the browser
>>> everything slows down. This is a simple effect which I think should
>>> run at a good speed regardless. I've uploaded a sample here:
>>> http://www.kurst.co.uk/ transfer/
>>>
>>> And the animation code is as follows:
>>>
>>> //CODE
>>>
>>>private function stopAnimation( ):Void{
>>>
>>>clearInterval( animationIID );
>>>
>>>}
>>>private function restartAnimation( ):Void{
>>>
>>>stopAnimation();
>>>animationIID = setInterval( this, "animationLoop" ,
>>> 10 );
>>>
>>>}
>>>private function animationLoop( ):Void{
>>>
>>>
>>>// make sure we always keep the counter within the
>>> length of the array
>>>if ( lineCounter > code_lines.length ) lineCounter =
>>> 2
>>>
>>>// print the text
>>>if ( lineCounter == 0 ) {
>>>
>>>field_txt.text = code_lines[lineCounter]
>>>
>>>} else { field_txt.text = field_txt.text +
>>> code_lines[lineCounter] }
>>>
>>>// ready counter for the next line
>>>
>>>lineCounter ++
>>>
>>>if (field_txt.maxscroll > 1 ){
>>>
>>>
>>>pageCounter ++;
>>>field_txt.t

Re: [Flashcoders] Slow performance

2006-09-04 Thread Scott Hyndman

I would also try to avoid string concatenation. It's usually a big
performance issue, since strings are immutable (so a sequential block
of memory has to be allocated, and the strings you are joining are
copied to the new location).

I would draw an entire page up front, then just reveal as you go
through masking or an mc overlaying the text.

Scott

On 04/09/06, Scott Hyndman <[EMAIL PROTECTED]> wrote:

Are you ever calling dispose on the bitmap data? Because if not it
won't run for long.

Scott

On 04/09/06, kariminal <[EMAIL PROTECTED]> wrote:
> Thanks for the replies so far...
>
> I am now using BitmapData.draw() ( and source_mc._visible=false + moved
> offstage ): it run a little faster than before. And only seems to choke when
> the browser is maximized at higher resolution ( around 1280x1024 ), maybe I
> am knit picking?...
>
> But, I think something is not going right in my code and that the draw loop
> could be optimized. The code now looks something like this:
>
> // code
>
> private function animationLoop( ):Void{
>
> if ( lineCounter > code_lines.length ) lineCounter = 2
> if ( lineCounter == 0 ) {
> field_txt.text = code_lines[lineCounter]
> } else { field_txt.text = field_txt.text +
> code_lines[lineCounter] }
>
> myBitmapData = new BitmapData(source_mc._width,
> source_mc._height , false, 0x );
> target_mc.attachBitmap(myBitmapData, 10);
> myBitmapData.draw(source_mc);
>
> lineCounter ++
>
> }
> // code
>
> I am finding it a little odd, that I am making a new BitMapData object every
> interval and tried moving it outside the loop but got strange results (due
> to my ignorance): every time 'attachBitmap' ran, it seemed the old bitmap
> was not being cleared.
>
> + also changed the font to Verdana, tried various interval times, but
> neither of these did much to improve the situation. Anyone think I can
> squeeze a little more FPS out of this one?..
>
> http://www.kurst.co.uk/transfer/2/ - Using BitmapData
> http://www.kurst.co.uk/transfer/1/ - and not
>
>
>
>
>
>
>
> -----Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Dan Rogers
> Sent: 04 September 2006 19:55
> To: Flashcoders mailing list
> Subject: Re: [Flashcoders] Slow performance
>
> If you're looking to improve performance and keep the speed of your
> animation, you could experiment with BitmapData.draw() and render a bitmap
> copy of a hidden text movieclip.  I think the bottleneck is mostly due to
> the heavy font vectors.  If your font movieclip was hidden and/or moved
> off-stage, you could probably get away with a single BitmapData object set
> to the size of the screen, redrawing each time the text changes.
>
> -Danro
>
>
> On Sep 3, 2006, at 1:19 PM, Marc Hoffman wrote:
>
> > I'm seeing a window full of text (Firefox, Win XP Pro) -- is this what
> > you intended? If so, that's a HUGE number of vectors to redraw so
> > rapidly. Furthermore, by using a serif font you're probably doubling
> > or tripling the number of vectors, so try the simplest, non-serif,
> > mono-stroke (consistent stroke thickness) font you can, such as
> > Verdana. And of course lengthen the redraw interval.
> >
> > Marc
> >
> > At 12:24 PM 9/3/2006, you wrote:
> >> Hi,
> >> setInterval each 10ms might be a bit overkill.
> >> grtz
> >> JC
> >>
> >>
> >> On 9/3/06, kariminal <[EMAIL PROTECTED]> wrote:
> >>>
> >>> Hello All...
> >>>
> >>> My flash movie fills the whole browser window. If the window is kept
> >>> small performance is great, however when I maximize the browser
> >>> everything slows down. This is a simple effect which I think should
> >>> run at a good speed regardless. I've uploaded a sample here:
> >>> http://www.kurst.co.uk/ transfer/
> >>>
> >>> And the animation code is as follows:
> >>>
> >>> //CODE
> >>>
> >>>private function stopAnimation( ):Void{
> >>>
> >>>clearInterval( animationIID );
> >>>
> >>>}
> >>>private function restartAnimation( ):Void{
> >>>
> >>>stopAnimation();
> >>>animationIID = setInterval( this, "animationLoop" ,
> >>> 10 );
> >>>

Re: [Flashcoders] Slow performance

2006-09-04 Thread Dan Rogers
That's a very good point to bring up- since you are only revealing a  
big block of text without extra effects, you could just use a mask.


On Sep 4, 2006, at 3:18 PM, Scott Hyndman wrote:


I would also try to avoid string concatenation. It's usually a big
performance issue, since strings are immutable (so a sequential block
of memory has to be allocated, and the strings you are joining are
copied to the new location).

I would draw an entire page up front, then just reveal as you go
through masking or an mc overlaying the text.

Scott

On 04/09/06, Scott Hyndman <[EMAIL PROTECTED]> wrote:

Are you ever calling dispose on the bitmap data? Because if not it
won't run for long.

Scott

On 04/09/06, kariminal <[EMAIL PROTECTED]> wrote:
> Thanks for the replies so far...
>
> I am now using BitmapData.draw() ( and source_mc._visible=false  
+ moved
> offstage ): it run a little faster than before. And only seems  
to choke when
> the browser is maximized at higher resolution ( around  
1280x1024 ), maybe I

> am knit picking?...
>
> But, I think something is not going right in my code and that  
the draw loop

> could be optimized. The code now looks something like this:
>
> // code
>
> private function animationLoop( ):Void{
>
> if ( lineCounter > code_lines.length )  
lineCounter = 2

> if ( lineCounter == 0 ) {
> field_txt.text = code_lines[lineCounter]
> } else { field_txt.text = field_txt.text +
> code_lines[lineCounter] }
>
> myBitmapData = new BitmapData(source_mc._width,
> source_mc._height , false, 0x );
> target_mc.attachBitmap(myBitmapData, 10);
> myBitmapData.draw(source_mc);
>
> lineCounter ++
>
> }
> // code
>
> I am finding it a little odd, that I am making a new BitMapData  
object every
> interval and tried moving it outside the loop but got strange  
results (due
> to my ignorance): every time 'attachBitmap' ran, it seemed the  
old bitmap

> was not being cleared.
>
> + also changed the font to Verdana, tried various interval  
times, but
> neither of these did much to improve the situation. Anyone think  
I can

> squeeze a little more FPS out of this one?..
>
> http://www.kurst.co.uk/transfer/2/ - Using BitmapData
> http://www.kurst.co.uk/transfer/1/ - and not
>
>
>
>
>
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of  
Dan Rogers

> Sent: 04 September 2006 19:55
> To: Flashcoders mailing list
> Subject: Re: [Flashcoders] Slow performance
>
> If you're looking to improve performance and keep the speed of your
> animation, you could experiment with BitmapData.draw() and  
render a bitmap
> copy of a hidden text movieclip.  I think the bottleneck is  
mostly due to
> the heavy font vectors.  If your font movieclip was hidden and/ 
or moved
> off-stage, you could probably get away with a single BitmapData  
object set

> to the size of the screen, redrawing each time the text changes.
>
> -Danro
>
>
> On Sep 3, 2006, at 1:19 PM, Marc Hoffman wrote:
>
> > I'm seeing a window full of text (Firefox, Win XP Pro) -- is  
this what

> > you intended? If so, that's a HUGE number of vectors to redraw so
> > rapidly. Furthermore, by using a serif font you're probably  
doubling
> > or tripling the number of vectors, so try the simplest, non- 
serif,

> > mono-stroke (consistent stroke thickness) font you can, such as
> > Verdana. And of course lengthen the redraw interval.
> >
> > Marc
> >
> > At 12:24 PM 9/3/2006, you wrote:
> >> Hi,
> >> setInterval each 10ms might be a bit overkill.
> >> grtz
> >> JC
> >>
> >>
> >> On 9/3/06, kariminal <[EMAIL PROTECTED]> wrote:
> >>>
> >>> Hello All...
> >>>
> >>> My flash movie fills the whole browser window. If the window  
is kept

> >>> small performance is great, however when I maximize the browser
> >>> everything slows down. This is a simple effect which I think  
should

> >>> run at a good speed regardless. I've uploaded a sample here:
> >>> http://www.kurst.co.uk/ transfer/
> >>>
> >>> And the animation code is as follows:
> >>>
> >>> //CODE
> >>>
> >>>private function stopAnimation( ):Void{
> >>>
> >>>clearInterval( animationIID );
> >>>
> >>>}
> >>>private function restartAnimation( ):Void{

[Flashcoders] Slow performance of Flash 7 content in Flash Player 9

2006-09-05 Thread Aaron Haines
Hi
 
Does anyone have any solid information about the performance of SWFs
published as Flash 7 when playing in Flash Player 9?
 
There seems to be some anecdotal evidence that it runs very slowly and we
are seeing some eveidence of this.
I heard somewhere that FP9 runs F7 content in emulation which accounts for
the slow speed.
 
Is this really true?
Has anyone else had similar problems?
 
Thanks
Aaron.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Slow performance of Flash 7 content in Flash Player9

2006-09-05 Thread Aaron Haines

No, I just mean playing a SWF published as Flash 7 in the F9 player.

So if the F9 player is actually two players 8 and 9 as you say then when you
play a F7 SWF in FP9 it should actually be the same as playing it in FP8?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Johannes Nel
Sent: 05 September 2006 17:06
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Slow performance of Flash 7 content in Flash
Player9

no, we don't have this problem and afaik player 9 is basically two players 8
and 9 with their respective vm's. or do you mean loading player 7/8 content
into a 9 movie?

On 9/5/06, Aaron Haines <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> Does anyone have any solid information about the performance of SWFs 
> published as Flash 7 when playing in Flash Player 9?
>
> There seems to be some anecdotal evidence that it runs very slowly and 
> we are seeing some eveidence of this.
> I heard somewhere that FP9 runs F7 content in emulation which accounts 
> for the slow speed.
>
> Is this really true?
> Has anyone else had similar problems?
>
> Thanks
> Aaron.
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training 
> http://www.figleaf.com http://training.figleaf.com
>



-- 
j:pn
http://www.lennel.org
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Slow performance of Flash 7 content in Flash Player9

2006-09-05 Thread Scott Hyndman

Yes, that's what he's saying.

On 05/09/06, Aaron Haines <[EMAIL PROTECTED]> wrote:


No, I just mean playing a SWF published as Flash 7 in the F9 player.

So if the F9 player is actually two players 8 and 9 as you say then when you
play a F7 SWF in FP9 it should actually be the same as playing it in FP8?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Johannes Nel
Sent: 05 September 2006 17:06
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Slow performance of Flash 7 content in Flash
Player9

no, we don't have this problem and afaik player 9 is basically two players 8
and 9 with their respective vm's. or do you mean loading player 7/8 content
into a 9 movie?

On 9/5/06, Aaron Haines <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> Does anyone have any solid information about the performance of SWFs
> published as Flash 7 when playing in Flash Player 9?
>
> There seems to be some anecdotal evidence that it runs very slowly and
> we are seeing some eveidence of this.
> I heard somewhere that FP9 runs F7 content in emulation which accounts
> for the slow speed.
>
> Is this really true?
> Has anyone else had similar problems?
>
> Thanks
> Aaron.
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com http://training.figleaf.com
>



--
j:pn
http://www.lennel.org
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Slow performance of Flash 7 content in Flash Player9

2006-09-05 Thread Peter Hall

In general, swf7 content should be the same or faster in FP8/9 than in
FP7. AVM2 is completely separate from AVM1, but some aspects are
shared. For example the incremental garbage collector, which was
introduced in FP8. It's *possible* that certain apps on certain
systems might appear to run slower, because of how they consume memory
and how that affects the GC, but this would apply to FP8 as well as 9.

Strings are stored and managed differently in AVM2, and I'm not sure
if that code change is shared with AVM1. This is supposedly an overall
performance improvement, vastly reducing memory usage when you do a
lot of string concatenation, but might be slightly slower in a few
cases.

When people discuss performance, they are usually talking about
rendering. As far as I am aware, this has hardly changed, with the
exception of new (optional) features, such as bitmap caching.

Peter



On 9/5/06, Scott Hyndman <[EMAIL PROTECTED]> wrote:

Yes, that's what he's saying.

On 05/09/06, Aaron Haines <[EMAIL PROTECTED]> wrote:
>
> No, I just mean playing a SWF published as Flash 7 in the F9 player.
>
> So if the F9 player is actually two players 8 and 9 as you say then when you
> play a F7 SWF in FP9 it should actually be the same as playing it in FP8?
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Johannes Nel
> Sent: 05 September 2006 17:06
> To: Flashcoders mailing list
> Subject: Re: [Flashcoders] Slow performance of Flash 7 content in Flash
> Player9
>
> no, we don't have this problem and afaik player 9 is basically two players 8
> and 9 with their respective vm's. or do you mean loading player 7/8 content
> into a 9 movie?
>
> On 9/5/06, Aaron Haines <[EMAIL PROTECTED]> wrote:
> >
> > Hi
> >
> > Does anyone have any solid information about the performance of SWFs
> > published as Flash 7 when playing in Flash Player 9?
> >
> > There seems to be some anecdotal evidence that it runs very slowly and
> > we are seeing some eveidence of this.
> > I heard somewhere that FP9 runs F7 content in emulation which accounts
> > for the slow speed.
> >
> > Is this really true?
> > Has anyone else had similar problems?
> >
> > Thanks
> > Aaron.
> > ___
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com http://training.figleaf.com
> >
>
>
>
> --
> j:pn
> http://www.lennel.org
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Slow performance of Flash 7 content in Flash Player9

2006-09-05 Thread Johannes Nel

i am under the impression that the string performance increases are avm2
only.

On 9/5/06, Peter Hall <[EMAIL PROTECTED]> wrote:


In general, swf7 content should be the same or faster in FP8/9 than in
FP7. AVM2 is completely separate from AVM1, but some aspects are
shared. For example the incremental garbage collector, which was
introduced in FP8. It's *possible* that certain apps on certain
systems might appear to run slower, because of how they consume memory
and how that affects the GC, but this would apply to FP8 as well as 9.

Strings are stored and managed differently in AVM2, and I'm not sure
if that code change is shared with AVM1. This is supposedly an overall
performance improvement, vastly reducing memory usage when you do a
lot of string concatenation, but might be slightly slower in a few
cases.

When people discuss performance, they are usually talking about
rendering. As far as I am aware, this has hardly changed, with the
exception of new (optional) features, such as bitmap caching.

Peter



On 9/5/06, Scott Hyndman <[EMAIL PROTECTED]> wrote:
> Yes, that's what he's saying.
>
> On 05/09/06, Aaron Haines <[EMAIL PROTECTED]> wrote:
> >
> > No, I just mean playing a SWF published as Flash 7 in the F9 player.
> >
> > So if the F9 player is actually two players 8 and 9 as you say then
when you
> > play a F7 SWF in FP9 it should actually be the same as playing it in
FP8?
> >
> >
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of
Johannes Nel
> > Sent: 05 September 2006 17:06
> > To: Flashcoders mailing list
> > Subject: Re: [Flashcoders] Slow performance of Flash 7 content in
Flash
> > Player9
> >
> > no, we don't have this problem and afaik player 9 is basically two
players 8
> > and 9 with their respective vm's. or do you mean loading player 7/8
content
> > into a 9 movie?
> >
> > On 9/5/06, Aaron Haines <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi
> > >
> > > Does anyone have any solid information about the performance of SWFs
> > > published as Flash 7 when playing in Flash Player 9?
> > >
> > > There seems to be some anecdotal evidence that it runs very slowly
and
> > > we are seeing some eveidence of this.
> > > I heard somewhere that FP9 runs F7 content in emulation which
accounts
> > > for the slow speed.
> > >
> > > Is this really true?
> > > Has anyone else had similar problems?
> > >
> > > Thanks
> > > Aaron.
> > > ___
> > > Flashcoders@chattyfig.figleaf.com
> > > To change your subscription options or search the archive:
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> > > Brought to you by Fig Leaf Software
> > > Premier Authorized Adobe Consulting and Training
> > > http://www.figleaf.com http://training.figleaf.com
> > >
> >
> >
> >
> > --
> > j:pn
> > http://www.lennel.org
> > ___
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
> > ___
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com





--
j:pn
http://www.lennel.org
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Slow performance of Flash 7 content in Flash Player 9

2006-09-05 Thread Johannes Nel

no, we don't have this problem and afaik player 9 is basically two players 8
and 9 with their respective vm's. or do you mean loading player 7/8 content
into a 9 movie?

On 9/5/06, Aaron Haines <[EMAIL PROTECTED]> wrote:


Hi

Does anyone have any solid information about the performance of SWFs
published as Flash 7 when playing in Flash Player 9?

There seems to be some anecdotal evidence that it runs very slowly and we
are seeing some eveidence of this.
I heard somewhere that FP9 runs F7 content in emulation which accounts for
the slow speed.

Is this really true?
Has anyone else had similar problems?

Thanks
Aaron.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com





--
j:pn
http://www.lennel.org
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Slow performance of Flash 7 content in Flash Player 9

2006-09-05 Thread John Dowdell

Aaron Haines wrote:

Does anyone have any solid information about the performance of SWFs
published as Flash 7 when playing in Flash Player 9?


Peter Hall did.


There seems to be some anecdotal evidence that it runs very slowly and we
are seeing some eveidence of this.


How can others see this too? A link to a particular SWF would be fine, 
but more direct would be a description of how others could make a small 
file to test a particular function. If other people can see it too, then 
we can make some progress.



Generally, new Players must play old content at least as well. There are 
some particular features which may not follow this rule (security 
requirements are one prominent exception), but the public Developer 
Releases are for identifying and addressing any such degradations. I'd 
still like to learn what you're seeing, thanks.


jd






--
John Dowdell . Adobe Developer Support . San Francisco CA USA
Weblog: http://weblogs.macromedia.com/jd
Aggregator: http://weblogs.macromedia.com/mxna
Technotes: http://www.macromedia.com/support/
Spam killed my private email -- public record is best, thanks.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Slow performance of Flash 7 content in Flash Player 9

2006-09-05 Thread Peter Hall

> Does anyone have any solid information about the performance of SWFs
> published as Flash 7 when playing in Flash Player 9?

Peter Hall did.


My comments were "informed speculation" :-)
A Flash Player engineer would be able to answer this more concretely.

Peter
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com