1 Reply Latest reply on Dec 28, 2007 6:38 PM by Jason Szeto

    Looking for tunning tips

    Cacademoniaca
      We are building an enterprise application using flex.
      Currently the app looks great!

      Thought I am noticing some lag in some parts of my app and I would like some pointer!

      My main module is composed of 10 tabs. Everyone of those tabs displays user information. The user information is encapsulated in a bindable bean (about 200 properties), and each tab has access to that bean.

      <!-- Main Panel with tabs -->
      <mx:Panel headerHeight="0" width="100%" height="100%" paddingTop="0">
      <mx:TabNavigator id="mainTabNavigator" width="100%" height="100%" change="handleTabChange();">
      <canvas:MA01Canvas accountBean="{accountBean}" group01Bean="{group01Bean}" id="maCanvas"/>
      <canvas:MB01Canvas accountBean="{accountBean}" group01Bean="{group01Bean}" id="mbCanvas"/>
      <canvas:FA01Canvas accountBean="{accountBean}" group01Bean="{group01Bean}" id="faCanvas"/>
      <canvas:FB01Canvas accountBean="{accountBean}" group01Bean="{group01Bean}" id="fbCanvas"/>
      <canvas:CW01Canvas accountBean="{accountBean}" group01Bean="{group01Bean}" id="cwCanvas"/>
      <canvas:SW01Canvas accountBean="{accountBean}" group01Bean="{group01Bean}" id="swCanvas"/>
      <canvas:AWCanvas accountBean="{accountBean}" mainGroupBean="{group01Bean}" id="awCanvas"/>
      <canvas:RWCanvas accountBean="{accountBean}" mainGroupBean="{group01Bean}" id="rwCanvas"/>
      </mx:TabNavigator>
      </mx:Panel>

      The problem that I am noticing is that when a user changes tab is taking about 1.5 seconds... Can I speed that up? Is there a way to preload those canvas? Or are those normal times?

      The other question that I have is about Flex Architecture...
      I have some WebService Handlers that basically take care of calling a web service, reading the results and dispatching an event letting know the caller the result of the call. This handlers are used among various modules and classes (java background :D) and instead of having one instance or singleton every module is creating it’s own instance when needed…
      I haven’t seen any performance cost (I think that flash player has WSDL caching)….
      I was wondering if any of you out there have any opinion about this…

      Should I define the handlers as instances of the parent application or define singletons???