• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

RegExp is 10x slower in Adobe Air

Explorer ,
Jun 04, 2016 Jun 04, 2016

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!

TOPICS
Performance issues

Views

660

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Jun 05, 2016 Jun 05, 2016

Hi,

AIR SDK 22 looks good, can you use it?

-Roshan

Votes

Translate

Translate
Adobe Employee ,
Jun 05, 2016 Jun 05, 2016

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 05, 2016 Jun 05, 2016

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 05, 2016 Jun 05, 2016

Copy link to clipboard

Copied

Hi,

AIR SDK 22 looks good, can you use it?

-Roshan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 05, 2016 Jun 05, 2016

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 05, 2016 Jun 05, 2016

Copy link to clipboard

Copied

LATEST

Since AIR 22 looks good. We have closed the bug.

Thanks,

Ankit

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines