Announcement Announcement Module
No announcement yet.
Memory consumption problem Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Memory consumption problem

    I have added the spring framework to my existing, Cairngorm but after two days work.. the result my project ate 15% more local memory than usual . solution: i did revamp to the older structure by removing spring from my project. I will be much interested to see IoC (especially spring) in my project.

    Any help, will be encouraged.
    The link to my context.xml for cairngorm


  • #2
    Hi Devaraj,

    is it possible to check your application with the memory profiler in Flash Builder 4 Beta? That should give us a better idea of where the memory is going.



    • #3
      result for memory profiler

      i checked with memory profiler for both versions, with and without spring actionscript..
      the spring actionscript packages were not consuming or having memory leaks..

      The only difference between the both are, i am instantiating a lot of classes at beginning it self in spring actionscript?
      private var _cairngormFrontController:CairngormFrontController ;
      private var delegateLocator : DelegateLocator;
      private var channel:AMFChannel;
      private var service:RemoteObject;
      private var applicationContext:FlexXMLApplicationContext;
      private var dtController: DTController;
      private var authenticationDelegate:AuthenticationDelegate;
      private var categoryDelegate:CategoriesDAODelegate;
      private var personDelegate:PersonsDAODelegate;
      private var projectDelegate:ProjectsDAODelegate;
      private var chatDelegate:ChatDAODelegate;
      private var companyDelegate:CompaniesDAODelegate;
      private var eventDelegate:EventsDAODelegate;
      private var fileUploadDelegate:UploadDelegate;
      private var fileDetailsDelegate:FileDetailsDAODelegate;
      private var groupDelegate:GroupsDAODelegate;
      private var languageDelegate:LangEntriesDelegate;
      private var commentDelegate:CommentsDAODelegate;
      private var phaseDelegate:PhasesDAODelegate;
      private var phasetemplateDelegate:PhasestemplatesDAODelegate;
      private var profileDelegate:ProfilesDAODelegate;
      private var propertiespjDelegate:PropertiespjDAODelegate;
      private var propertiespresetsDelegate:PropertiespresetsDAODele gate;
      private var statusDelegate:StatusDAODelegate;
      private var taskDelegate:TasksDAODelegate;
      private var teamlineDelegate:TeamlineDAODelegate;
      private var teamlinetemplateDelegate:TeamlineTemplatesDAODeleg ate;
      private var teamtemplateDelegate:TeamTemplatesDAODelegate;
      private var translateDelegate:TranslateDAODelegate;
      private var workflowDelegate:WorkflowsDAODelegate;
      private var workflowtemplateDelegate:WorkflowstemplatesDAODele gate;
      private var directoryDelegate: DirectoryDAODelegate;
      private var logoutDelegate:LogoutDAODelegate;
      Last edited by nsdevaraj; Jun 2nd, 2009, 11:59 PM.


      • #4
        how much exactly?

        Hi there Devaraj,

        how much more memory exactly are we talking about here? I mean, if your application used to consume 10MB and adding spring actionscript adds another 1.5 meg, then yes, it would be rather much. But if it was 200K, and now it grew by 20 or 30k, it wouldn't be that weird since the container does consume its own piece of memory naturally.

        As for all the objects you're instantiating at startup, are they necesary? I see quite a few delegate classes getting instantiated, which are quite commonly transient objects i.e. they get instantiated and destroyed after use. So maybe you need to mark those objects with scope="prototype"?

        hope this helps a little,




        • #5
          Thanks for your help

          The case is as you mentioned, it was 100MB and now it is 120MB with Prana.. The using prototype scope for delegates, does not helped much.


          • #6
            20MB is a lot

            Hey there,

            20MB extra is a lot indeed, which objects take the most memory according to the profiler? Is it the Accessors?

            Somehow I have the feeling that as3commons.reflect is the culprit here, but I'm not sure yet...