Pre-Filtering the Calendar

Support for our integrated Contact Manager, Calendar, and Project Tracker.
Posts: 10
Joined: Sat Oct 16, 2010 5:59 am
PostPosted: Sun Jun 26, 2011 1:23 pm
Since making the change to hosting my solution on FileMaker Server, I have become more acutely aware of the potential benefits of pre-filtering my events database (which has ~35,000 events spanning multiple years worth of appointments.)
I have reviewed the documentation relevant to using filters (http://www.seedcode.com/pmwiki/pmwiki.p ... ar.Filters). I am hopeful that the last section ("Can I pre-filter the calendar so it starts up already filtered?") would reduce the number of records and speed up the start up time when I first load the solution. I am trying to pre-filter the events based on the date field so that it will only look at records occurring since 1 year prior to the current date.
I see the "Pre-Filter the calendar if necessary" near the end of the "Load Calendar Settings - On Startup --- Edit Configuration Here ---" script but I am not sure where I am supposed to enter the criteria (e.g. DateStart > Get ( Current Date ) -365.) The documentation suggests that I am to edit the first entry of the pair of script steps in order to set the value to be filtered but the documentation does not indicate where to set the filter criteria.
I look forward to any guidance that you may provide.

JLKochJr
Jack L. Koch Jr., M.D.
SeedCode Staff
SeedCode Staff
Posts: 691
Joined: Mon Feb 28, 2011 2:47 pm
PostPosted: Mon Jun 27, 2011 9:24 am
Hi Dr. Koch,

The pre-filtering, as it's set up, is designed to work on one of our default filters: project, status and resources. The dates themselves don't need to be filtered, as they are already filtered according to which view you select, there's not a routine where we're loading more than a year's worth of events, and the speed there isn't really affected by how many events exist, but how many we're loading at one time. Filtering will reduce the number of events to be loaded within a specific date range, and will therefore speed up the calendar loading.

The Upon Opening routine itself, doesn't really look at any events. That happens when you start entering the calendar layouts themselves. Is it the Upon Opening routine itself, or when you first enter the Calendar layouts that you're trying to "speed up?"

Let me know, and we'll try to narrow it down,
-Jason
Posts: 10
Joined: Sat Oct 16, 2010 5:59 am
PostPosted: Mon Jun 27, 2011 10:06 am
I hope to speed up both, particularly the initial start up time when I am using my front end outside of the LAN containing the server. Whenever a script calls for a search, FileMaker Server (as I understand it) sends all of the records to the users machine. That ends up being quite a long time when a show all records script step is used in the calendar or in my progress notes section.
I was hoping that the pre-filter somehow limit the number of records that the server would be searching.
I still don't understand how the pre-filters as you are describing them are any different than the default filters. The documentation seemed (to me) to suggest that they are separate entities.

JLKoch
Jack L. Koch Jr., M.D.
SeedCode Staff
SeedCode Staff
Posts: 691
Joined: Mon Feb 28, 2011 2:47 pm
PostPosted: Tue Jun 28, 2011 10:51 am
Hi,

Right, the pre-filters and default filters are the same thing, it's just a matter of whether you want them "turned on" by default or not. In either case, the filters are applied using a regular constrain after the initial date range find. So, we're not "pre-filtering" a FileMaker find in the true sense.

Typically it's not the finds themselves that are the performance issue, even over the WAN. It's the loading of the found events into global variables and then parsing them to be displayed. The reason filtering helps this is there are potentiality less events to load and parse. This is why the day view will load significantly faster than the month view. It can be somewhat tedious, but running through these routines with the debugger can help isolate what's bogging it down.

We've got some general docs on speed performance here that you may want to check out:

http://www.seedcode.com/pmwiki/pmwiki.p ... ndar.Speed

Let me know if that helps,
Jason
Posts: 10
Joined: Sat Oct 16, 2010 5:59 am
PostPosted: Tue Jun 28, 2011 11:53 am
Your explanation does help and the clarification makes everything a lot simpler to understand. Thank you. The URL that you provided is actually the original source of my questions. I was going through it and systematically trying to do what I can to speed up the solution, especially over the WAN.
Jack L. Koch Jr., M.D.

Return to SeedCode Calendar

Who is online

Users browsing this forum: No registered users and 2 guests

cron
(855) SEEDCODE
[email protected]
Follow us: