[FX.php List] Best Practice
DC
dan.cynosure at dbmscan.com
Wed Sep 20 18:33:07 MDT 2006
Here's something from the archive about optimization:
------------------------------------------------------------------------
---
in addition...
1) there was a report of container fields causing slowdowns. so,
probably don't use container fields, just reference external files
with stored paths.
2) learn to use and maintain lookup fields. you have to script them
so they stay in synch, but your speed will improve immensely.
3) don't run FMP scripts via web calls.
4) here's one that'll give your processor some more time back:
hide filemaker in the finder using command-h. having it sit as an
unhidden app seems to make it suck more CPU. i run this as a cron job
every 5 minutes to do this because it gives a few percentage points
(but this script does it only if the screensaver is on):
osascript -e 'tell application "System Events" to set process_flag to
(exists process "ScreenSaverEngine")' -e 'if process_flag then tell
application "System Events" to set visible of process "Filemaker Pro"
to false'
5) finally, make sure your find requests are really finding the
smallest data subset they can.
HTH,
dc
Michael Layne had written:
> Scott,
>
> I posted this within the last couple of weeks, but it is universal
to FX (I think...)
>
> When building solutions via XML (FX.php) for the web, I always
take the following steps:
>
> - create a separate layout for anything that is called via XML.
> - only place pertinent, necessary fields in the layout. related
fields are fine, but use only what you need... you want it
practically naked, it's so spartan.
> (* remember, if you have related fields that are not always a
'valid' relationship, place them in portals)
> - summary fields slow things down, as well as anything that slows
down FMP. It's hard if you have a primarily FMP client based
solution, but I usually try to do all logic, calculations, etc within
PHP. When it comes to the web, it helps to think of FMP as a place
to store data whenever you can. I start that way, then add the
necessary FMP functionality.
>
> I have had considerable success sticking to these guidelines.
>
> HTH,
>
> Michael
>
> On Oct 7, 2005, at 9:00 AM, Scott Baetz wrote:
>
>> All,
>>
>>
>>
>> I am the webmaster/dba for http://www.bays.org <http://
www.bays.org/>. We are a non-profit organization within the Boston
Massachusetts area providing scores and standings information to
young boys and girls and their parents. Ok, enough background.
>>
>>
>>
>> We migrated from a ColdFusion MS Access solution to FM7 and
FX.php earlier this year. The product is much more to our liking,
since we can use the FileMaker database internally (the
administrative staff are MAC users and very proficient with MAC and
FileMaker) and we provide a nice interface to our end users through
the web. However, now that we are within full season and we have
over 5,000 hits to the site per day, and are constantly generating
server timeouts. We are using a G5 dual processor with 1gig Memory
running OSX server…
>>
>>
>>
>> Given that our database includes a limited number of tables, and
in total we have less than 20,000 records, I suspect that we are in
need of some optimization. Herein lies our struggle. While we can
easily create more layouts, and change FX.php queries, I would like
some general “Optimization Techniques” or guidelines to follow. As
an example is it better to push FX.PHP query data into arrays and
loop through the PHP array, or when is it as easily acceptable to use
the foreach loop through the query results from the FX.php query.
>>
>>
>>
>> My hope from this message is that someone might provide the “Five
Golden Rules” to FX.php programming or something similar….
>>
>>
>>
>> Best regards,
>>
>>
>>
>>
>>
>> Scott Baetz
>>
>> sbaetz at soscs.net <mailto:sbaetz at soscs.net>
>>
>> (603) 490-9988
>>
>> http://www.soscs.net
On Sep 20, 2006, at 3:23 PM, Tom Sepper wrote:
> I just spent the time removing unused fields from all of my layouts. I
> must say that the speed is far better!
>
> Is this documented somewhere and I was just a goof and missed it?
>
>
> ---
> Tom Sepper
> Director of Information Technology
> Director's Choice Tour & Travel
>
> P 806.762.6354
> F 806.763.7637
>
> tsepper at dctandt.com
> www.directorschoicetourandtravel.com
More information about the FX.php_List
mailing list