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

Typelag happens in big projects. AKA 38,325 lines of code.

Community Beginner ,
Nov 22, 2010 Nov 22, 2010

Copy link to clipboard

Copied

My machine runs very fast in all other applications, it is a gaming computer that runs Starcraft 2 smoothly on the highest settings.

I'm writing a very big application in Flash.  It is well on its way to being a MMORPG.  I have hundreds of classes, but my biggest class has really off the charts type lag.  My biggest class is 38,325 lines of code.

Now every time I type, it tries to highlight words in grey for some reason.  I think every letter I type, it searches the entire 38,325 lines of code for that word in order to highlight all cases of it.

take a look at this picture and how "hud" is highlighted

LINK: http://www.goodnewsjim.com/images/slowdown_FB4.png

As I move the cursor around and edit, I often times get 1-5 seconds of slowdown, sometimes I even get 20 seconds of type lag where the Flash Builder temporarily says "Not Responding in the window bar".  This happens all of the results of me typing letters, moving arrow keys or pressing delete or backspace.

For small edits, I can wait 20 seconds to edit one word, but when I work a lot on my code, I have to open an external editor like Scite, but the alt-tabbing consumes time, and there is a mouseclick to reload the .as file.  I would like to use Flash Builder 4 for editing my code, after all that is what an IDE should be able to do if anything.  An IDE should at the very least be no worse than a generic text editor.

Please tell me how I can disable Flash Builder 4 from trying to highlight words in grey. I think this is what is causing my typelag.  I've turned off code hints.

Views

1.1K

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 ,
Nov 23, 2010 Nov 23, 2010

Copy link to clipboard

Copied

Some things to try:

1. In Window -> Preferences -> Flash Builder -> Editors, try increasing the "Activate after" delay to 200ms.

2. Toggle mark occurrences in the toolbar (next to the Search toolbar icon)

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
Community Beginner ,
Nov 23, 2010 Nov 23, 2010

Copy link to clipboard

Copied

Anirudh,

Thank you again for your quick response.

1) I already disabled Code assist completely in Window -> Preferences -> Flash Builder -> Editors.

2) Ok, I did toggle mark occurances off.

The problem still persists.  I still have type lag. 

,Jim

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
Community Beginner ,
Nov 23, 2010 Nov 23, 2010

Copy link to clipboard

Copied

I think there should be an option: Turn off all processing between typing.

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
Community Beginner ,
Nov 23, 2010 Nov 23, 2010

Copy link to clipboard

Copied

Anirudh,

Actually it seems like it did help to turn of Mark occurances

I still get 200ms type lag in general, but I'm no longer getting the 1-20 second type lag that Mark occurances caused.

This is tolerable now.

,Jim

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 ,
Dec 02, 2010 Dec 02, 2010

Copy link to clipboard

Copied

Can you try switching off "Highlight matching braces". It's under Window -> Preferences -> Flash Builder -> Editors -> Braces (group)

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
Community Beginner ,
Dec 02, 2010 Dec 02, 2010

Copy link to clipboard

Copied

Sameer,

That actually lessens type lag?  Nice.  I left it on because I didn't think it caused much.  Helpful response ++

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
Community Beginner ,
Dec 02, 2010 Dec 02, 2010

Copy link to clipboard

Copied

Nah, I still get 50ms-200ms type lag.

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
New Here ,
Dec 02, 2010 Dec 02, 2010

Copy link to clipboard

Copied

My biggest class is 38,325 lines of code.

I hope you meant project, but in case you did not I would strongly very strongly recommend much smaller class sizes ~50-200 lines of code per class. That is a huge code smell.

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 ,
Dec 07, 2010 Dec 07, 2010

Copy link to clipboard

Copied

LATEST

I agree, you shouldn't have a class that big.  Maybe look at consolidating redundant code into single functions or identify common logic and move it to a logic class.  I know that doesn't directly address the problem you brought up, but I think writing more efficient code will both fix the lag and make your game run smoother.

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