• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 455
  • Last Modified:

FM - Problem with Portal Response Time Using Summary Numbers

I have Year, YearMonth, and YearWeek tables that I use to total the count of Leads by agent.  Then I bring these back in via an X relationship and a portal.  However, when I click on the tab for the portal (each of the 3 above have their own separate tab), it takes about 3-5 seconds to show, thus it seems it is calculating.  

The Year tab/portal has the slowest reponse time and even shows a "not responding" in FM.  I even tried limiting it to only go back to 2009 and it shows little improvement.  The LEADDATA table is 26,000 records, but I thought FM could handle that easily.  Is there a better method than the one I'm using?  See screen prints.

I've thought of making the calc fields stored, but that would work for the past numbers, but not the current year, month, or week.  As I was doing the screen prints, I noticed that the flag fields are unstored.  Orginally, those could change, but now we have a separate reassign field, so possibly I could store these.  Any other suggestions?
-LEADDATAtable.jpg
-Yeartable.JPG
-Portal.jpg
0
rvfowler2
Asked:
rvfowler2
  • 2
  • 2
3 Solutions
 
Will LovingPresidentCommented:
You do seem to be pulling a lot of summarized data across multiple relationships and that will definitely slow down portal display because each summary is being calculated on the fly. In general, the more "unstored" fields involved, the slower the response will be so eliminating those can sometimes make a significant difference.Summaries are by definition unstored, so if you summary fields are summarizing data that is also unstored that will also slow things down. Your "flag" fields are probably an excellent place to start.

Depending on your needs and structure, you can create ways to prevent an unstored calculation. The main way to do this is to a parallel, number or text field that is set to Auto-Enter every time another field changes or is updated, that is updated whenever a particular script runs, or that is updated via a script run on a schedule basis such a on Startup or via a "Refresh" button. The script or Auto-Enter calculation updates the parallel field based on the unstored calculations current value. All of this is intended to give you a number or text field that is current but also indexed (stored).
0
 
slinkygnCommented:
I think you're on the right track.  Storing the flag fields (and then letting them get indexed after the next access) will help -- in fact, that may help more than anything else.  Storing the totals will help as well; if you have issues with the recent ones not being updated, you can force update them via a script trigger on the tab object.  OnObjectModify fires when you switch tabs; you can then GetLayoutObjectAttribute to see which tab is in front and force an update to the most recent year/month/week accordingly.
0
 
rvfowler2Author Commented:
How would you force an update?  Do you use the RefreshWinFlushCachedJoin or is that only the join and not the actual calc field.  I've always wondered how you would trigger or refresh a stored calc.
0
 
Will LovingPresidentCommented:
Well, unless all fields are local, a calculation can't be stored, especially if it's summarizing related records. However, you can store the result of an unstored Calc in the previously described parallel field.

You could, via a script trigger force an update of the parallel field each time and edit is made to an individual record. You can also experiment with using a calculated auto-enter on the parallel field (with the second checkbox unchecked in the Auto-Entery options) be referencing in a calculation a field that is changing and causing the total to change. Or, you can run it more globally by periodically doing a Replace on all the parallel fields.
0
 
rvfowler2Author Commented:
Thanks.  All suggestions really hepful.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now