You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Ahh ok, I just took at look at the code. Even though the function code is in Flash I guess there are just so many functions in there it's using all the memory.

    Can I suggest that you just remove functions like:

    TRIP.prototype.getTripState = function() {
      return this.showTrip;
    TRIP.prototype.setTripState = function(t) {
      this.showTrip = t;

    And just access showTrip directly? Literally all the getters and setters are doing here is using up memory and slowing things down.

    The other option you have is to do something like:

    GPS.prototype.getUtils = function() {
    return {
      getWPdistance : function() {...},

    This way, the functions aren't loaded into RAM all the time. You just call gps.getUtils().getWPdistance() instead, and it's slower, but absolutely everything stayed in flash until it was needed.


Avatar for Gordon @Gordon started