Copy link to clipboard
Copied
This code run 10x slower in Adobe Air:
import flash.utils.getTimer;
var str:String = "I'm a short string I'm a short string I'm a short string I'm a short string I'm a short string";
var r:RegExp = /rt|tr|m|a|n/g
var t:int = getTimer();
var result:String;
for (var i:uint = 0, n:uint = 100000; i < n; ++i)
{
result = str.replace(r, '|');
}
trace(getTimer() - t);
trace(result);
I run this code in both Flash Player and Adobe Air (Release Mode, Win 10 64-Bit, Dell Inspiron 3542), and get the result:
Flash Player: 874 ms
Adobe Air: 5461 ms
I tested this code with Animate CC and Flash Develop and get the similar result. Sometimes I get 10x slower.
I has been posted this issue here: Bug#4161031 - Regular Expression (RegExp) is 10x slower in Adobe Air
It's a strange issue. Anybody that interest please do the test and report the result here?
Thanks!
Hi,
AIR SDK 22 looks good, can you use it?
-Roshan
Copy link to clipboard
Copied
Hi @Ylazy
Did you notice this difference in the latest Air Builds? How is the performance in earlier version of AIR Say SDK 18 and 19
-Roshan
Copy link to clipboard
Copied
I've tested again with more AIR SDK:
Flash Player 18: 828 ms
AIR SDK 18: I cannot install AIR SDK 18 with Animate CC
Flash Player 19: 795 ms
AIR SDK 18: I cannot install AIR SDK 18 with Animate CC
Flash Player 20: 4171 ms
AIR SDK 20: 5365 ms
Flash Player 21: 796 ms
AIR SDK 21: 5684 ms
Flash Player 22: 854 ms
AIR SDK 22: 923 ms
Copy link to clipboard
Copied
Hi,
AIR SDK 22 looks good, can you use it?
-Roshan
Copy link to clipboard
Copied
Thank you for quick response,
yes AIR SDK 22 looks good but I still cannot understand why it's always slower compare to Flash Player or Browser run-time.
I'm going to close the bug on bugbase but I cannot edit the bug.
Thank so much!
Copy link to clipboard
Copied
Since AIR 22 looks good. We have closed the bug.
Thanks,
Ankit