Results 1 to 6 of 6

Thread: Memory consumption problem

  1. #1
    Join Date
    Mar 2009
    Posts
    4

    Default Memory consumption problem

    Hi,
    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


    Regards,
    Devaraj

  2. #2
    Join Date
    Oct 2008
    Location
    Belgium
    Posts
    160

    Default

    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.

    thanks,
    Christophe
    Christophe Herreman
    Spring ActionScript Founder
    http://www.herrodius.com

  3. #3
    Join Date
    Mar 2009
    Posts
    4

    Default 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;
    Regards,
    Devaraj
    Last edited by nsdevaraj; Jun 2nd, 2009 at 11:59 PM.

  4. #4
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    406

    Default 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,

    cheers,

    Roland

  5. #5
    Join Date
    Mar 2009
    Posts
    4

    Default 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.
    Regards,
    Devaraj

  6. #6
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    406

    Default 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...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •