PDA

View Full Version : Flash 9 and 10 .as editor slow in Vista/7


John Peterson
09-21-2009, 03:55 AM
Has anyone experienced this or understood this problem? I wrote my first observations about this here (http://www.kirupa.com/forum/showpost.php?p=2503226&postcount=20).

This is my results for Flash.exe CPU usage as a percentage of the total 4.2Ghz on my dual core 2.1Ghz CPU (50% is usually a peak CPU usage since no text editing actions seems to be multi-threaded in Flash 9 or 10) in Vista (I also tried it in Windows 7 with similar results as in Vista). Windows Aero is off so dwm.exe CPU usage is 0% all the time. I'm testing the typing of both simple letters and the quote letter " that seems especially slow.

In a blank .as file


Typing a letter repeatedly (for example "a" by holding down the key, I'm using the fastest keyboard repeat rate in Vista): 20% CPU usage (i.e. around 40% of the maximum for that thread)
Typing " (quote letter) repeatedly (holding down "): 20% CPU usage

In a big .as file

For example Adobe Flash CS4\Common\Configuration\Component Source\ActionScript 3.0\User Interface\fl\controls\DataGrid.as that has 3000 lines of code. Or a smaller file with only 1000 lines of code or less.


Typing a letter repeatedly: 50% CPU usage (max)
Typing " (quote letter) repeatedly: 50% CPU usage (max). One " letter takes around 2Ghz to process (or one second on my PC), holding down " locks up Flash.exe for an equivalent amount of time, for example 30 seconds if you hold it down to let it type 30 " or more.

Some observations and estimates


No difference between Vista and Win 7
No difference between 32 bit and 64 bit, both XP 32 bit and XP 64 bit is ~5 times faster than this. Typing repeated " (quotes) in a big .as file is still slow even in XP, but around ~5 times faster than in Vista/7.
Turing off Windows Aero gives better performance, but only little, the core Flash code is still slow. With the first "holding any key" example above dwm.exe will use another 10% in addition to the 20% Flash use. And I guess any dwm.exe CPU usage is additional CPU usage, and a bigger delay for the user.
Text anti-alias (Windows Appearance > Effects > ClearType) in the code window produce no noticeable difference in CPU usage.
Anecdotal evidence, what I felt, didn't test this a lot: Running Flash 9 (CS3) in Win XP compatibility mode in Vista reduced the CPU loads somewhat, it got perhaps twice as fast, but still much slower than XP. Running Flash 10.0.2 in Win XP compatibility mode (in Vista) makes no difference.
The 9.0.2 and 10.0.2 patches has no effect on this. The CPU loads are identical for this purpose of .as file editing.
No difference between editing 1.0, 2.0, 3.0 .as files (the text editor will probably not treat them very differently in terms of auto correction or code coloring, which I turned off anyway)
These settings are off: General > Show tooltips. ActionScript > Code hints and Code coloring. Auto Format > All options. However I could not notice any difference by disabling/enabling any of these settings. So it's a mystery how typing can require so much of the CPU from Flash.exe if all these settings are off.

(Saying what I do as a result of this is not much help, you can pretty much figure that out and it doesn't solve anything. But this is what I do. I sometimes still use Flash 9/10 in Vista and endure the pain. And sometimes use XP where this problem is almost unnoticeable, either by rebooting to XP or running it inside VMWare in Vista. The slowest common operation that I have found, typing a " (quote) letter, is still slow in XP, but it only cause a ~0.2 second delay (compared to a 1.0 second delay in a big .as file in Vista/7) and therefore cause only a very small annoyance. I have not gone so far as to use a separate code editor and only compile the .as files in Flash. It's less annoying to use XP instead and get the job done inside Flash.)

Please feel free to post any of your observations. (You can make the Task Manager always on top and see the CPU usage of Flash.exe and possibly dwm.exe while you type.) My feeling is that if we talk about this and produce the best benchmarks and guesses we can without having the Flash source code, the Adobe developers will take note of this problem and fix it, possibly in Flash 11 already. Because this is a coding issue that needs to be addressed. (Typing a quote letter in a big .as file should not lead to two billion CPU instructions.) We can not grow out of it with faster CPUs. Primarily since the code editor is single threaded and CPU speeds for a single core is growing very slowly, it may not even double in ten years.

madcat
09-24-2009, 03:05 PM
This won't be much help... but I use Vista and haven't experienced such.

Do I think Vista is a nightmare, yes I do.

CyanBlue
09-24-2009, 03:53 PM
Howdy and Welcome... ;)

I have tried what you said on Vista/CS3, and I don't see that's happening... Very tiny bit of spike does show up when I play with the quotes, but it is really neglectable, at least for me...

Here is my 2 cents on this situation... What I see is that you are having problem with the Actions Panel in Flash IDE when typing rapidly and such... I know that Actions Panel does have its own place when you develop, but you really need to move out to an external editor like FlashDevelop or FlexBuilder if you are a developer and/or if you are messing with the AS file that is like 1000 lines long... That's the direction where Adobe is heading with the Flash IDE... They are not speding enough time/money to fix what's not mostly used, and they are somewhat ignoring what the designer community is saying/venting, if you ask me...

John Peterson
10-13-2009, 04:11 PM
Howdy and Welcome... ;)


Thank you


I have tried what you said on Vista/CS3, and I don't see that's happening... Very tiny bit of spike does show up when I play with the quotes, but it is really neglectable, at least for me...


How fast is your CPU? Can you hold down the keyboard key to rapidly write multiple quote signs (" or ') without any delay or slowdown? In a big .as file?


Here is my 2 cents on this situation... What I see is that you are having problem with the Actions Panel in Flash IDE when typing rapidly and such... I know that Actions Panel does have its own place when you develop, but you really need to move out to an external editor like FlashDevelop or FlexBuilder if you are a developer and/or if you are messing with the AS file that is like 1000 lines long... That's the direction where Adobe is heading with the Flash IDE... They are not speding enough time/money to fix what's not mostly used, and they are somewhat ignoring what the designer community is saying/venting, if you ask me...

Thanks for the suggestion. I tried FlashDevelop now and it works great. What a relief. I can compile the code with the Adobe Flex command line compiler and show the program inside FlashDevelop. Both AS2 and AS3 and all mx.controls and fl.controls works as usual.