pschillinger / flexbe_chrome_app

Contains the source code of the FlexBE Chrome App.
BSD 3-Clause "New" or "Revised" License
2 stars 6 forks source link

[Bug] Parsing behaviors with concurrency takes extremely long when saved with spaces as indentation #5

Closed achim-k closed 8 years ago

achim-k commented 8 years ago

The title basically says it all. If I save the same behavior with tabs as indentation, it works fine. I traced it down to https://github.com/pschillinger/flexbe_chrome_app/blob/b040351d91bf6a2aa21b5973f67ea5b1b9810eb6/FlexBE/src/_helper/codeparser.js#L277-L287. It takes ages there when the behavior was saved with spaces as indentation. I assume that the regex patter cc_definition_pattern needs to be adapted? Bug was probably introduced by faea56748f1c63386c5bb11d438605e8cc8f80db ?

pschillinger commented 8 years ago

Thanks for pointing that out! The regex pattern actually contains a typo. It still matches the correct sequences, but this typo might cause the performance issue. I will fix it tomorrow, hope this resolves the issue.

pschillinger commented 8 years ago

I fixed the typo on the develop branch. Can you install this version and check if it also helps regarding the performance for you?

achim-k commented 8 years ago

It indeed fixed the performance issue. However, the regex pattern was still wrong, causing it to not recognize the whole ConcurrencyContainer element. Parts of it were instead parsed as private variable. I created a PR #6 which should fix this issue.

pschillinger commented 8 years ago

Should be resolved by your fix. Feel free to close this issue if it works for you now.

achim-k commented 8 years ago

It did, thanks! Also for the \s hint