2 Replies Latest reply on Sep 1, 2011 6:58 AM by Rangora

    Why is there no love for proceedural programming? (Type lag rant)

    GoodNewsJim Level 1

      I wrote this game using mostly proceedural concepts:



      I have a ton of globals, and all my methods are in the same file.

      To me, proceedural programming keeps things simple and easy.

      The easier you keep code, the more complex things I can do with it because I'm not worried about an architecture.


      The problem comes in that Flash Builder 4 & 4.5 introduces painful type lag with files greater than 30k lines of code.

      The type lag gets slowly worse the longer FlashBuilder 4 &4.5 is open.  So if I leave it open for a few days, I get maybe 10 seconds between my keypresses.

      The solution is to close FlashBuilder and reopen it, but the type lag does not fully go away, just more bareable.

      It goes from 10 seconds down to 1 second in a 46k line of code file.


      You see the main work around for major type lag is to open the file in Scite or Notepad.  Notepad and Scite has 0 type lag between keys.  And I type reaaaaaly reaaaaly fast.  So 1second delay between my keypresses is agonizing.  This work around is subpar though because I end up editing the file in two different locations, and I have to constantly remind FlashBuilder to update the saved file from SCite.  Also opening Scite takes some time to locate the files and stuff, where FlashBuilder, you just 2x click it in the toolbar.


      Here is my request:

      If you cannot track down your Type Lag bug which is also possibly a memory leak bug, just do the following:

      Add a "plain text mode" for editing files.


      Plain Text mode would do no formatting, no code complete checking, no {} matching, no processing at all.




      I would be operating at a 60k line of code project now, but due to this annoying type lag bug, I had to go through a week of refactoring my code.

      Here is what I did:

      I copy/pasted my main application into: ZZZ_Condensed_Function.as

      Then I made a constructor where I pass in the main application as this.


      Then to access any global variable from the main class, I do v.global_variable.

      And to access a function from main, I do zzz.function()

      My code loooks sooooooooooo ugly now because I can't make really big files.

      And things are getting worse, I am now making ZZY_Condensed_Function.as  because I need to keep splitting files up because FB does not allow you to edit large files.  I am now forgetting which class is holding my methods.  If they were all in one big file, I could just ctrl+f find them.


      So pleaaaaaaaaaaaaaaaaaaaaaaaaaaaaase

      PLEASE PLEASE PLEASE.  I'd even paypal Adobe 200$ if you make it so you can edit things in a plain text file as an option, instead of the editor we use now with all its convoluted processing.