hi guys, *Questions*: 1: Why so great difference between same specific RegExp and line? and why only in the second run, we have performance issue? I can see the only difference is the two RegExp are different instances.
2: Any clue or hint to fix this issue? *Backgrounds*: The air program goes through big text files by multiple RegExps. a)The biggest text files is about 137K lines, b)In some long line(about 50 lines), there are about 1727 ascii chars, and even one line is about 8534 ascii chars. and air program has about 40 RegExps. c)Matching line with RegExp by "var mateched:Boolean = (regExps[index] as RegExp).test(line);" d)the specific RegExp is "(ERROR|FATAL|!ERROR_PRINTER_SETUP|!CA_ERRORCOUNT)". e)Windows Vista, Flex builder3, flex sdk3.2, actionscript3 f)Any other information need? You may refer to my previous topic: "A weird performance issue" and "A weird performance issue about regExp!" *Step&Results*: First, new about 40 RegExp in air program, and processing each line of each text files. Result is: for these 1727 char line, each line cost about 2 milli second for the specific RegExp. for 8534 char line, the line costs about 26 milli second for the specific RegExp. Then, re-new the same 40 Regexp in air program, and processing each line of each text files. But result is: for these 1727 char line, each line cost about 9-10 milli second for the specific RegExp. for 8534 char line, the line costs about 250 milli second for the specific RegExp. Then, do the same step again and again, but the result is like first result above, not like the second result any more. Thanks --- 09年11月3日,周二, ha a <[email protected]> 写道: 发件人: ha a <[email protected]> 主题: Weird performance issue 收件人: [email protected] 日期: 2009年11月3日,周二,下午1:35 An air program will process many log files, click run button to inspect these log files one by one. *Problems*: Click run button, then the air program's performance is OK. Click run button again, then the air program's performance maybe OK or may not OK.(about 60-70% is NOT OK) Click run button again, then the air program's performance is OK. .... ... Then, seems only the second run may have the performance issue. So weird? In fact, each run should do the same thing. BTW, the busy cursor is a clock, when running slow, the clock cursor also run slowly. *About profiler*: And I also use Flex builder profiler to analyse. For example, for OK run, elapse time: 2min the biggest cumulative time: 1min for issue run: elapse time: 7min the biggest cumulative time: 3.5min *Questions*: 1. Do you have any general clue or hint on this issue? 2. About profiler, for example, the elapse time is 7min, but cumulative time is 3.5min, where is another 3.5min? seems some functions were not be counted by profiler? how can I know what costs the another 3.5 min? *Backgrounds*: 1. Windows Vista, Flex builder3, flex sdk3.2, actionscript3 2. when processing log, read file, check each line for finding the keyword. 3. one virtual thread(by timer) is for one log file processing. 4: any other information need? Thanks 好玩贺卡等你发,邮箱贺卡全新上线! ___________________________________________________________ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.com/

