[FX.php List] Please help with slow code
Chris Hansen
chris at iViking.org
Thu Jun 26 10:21:56 MDT 2014
Hi Stephe,
A few questions:
1) Are there many excess fields on the layout in question?
2) Are there any summary or unstored calculation fields?
3) Have you tried performing the query using data type FMPro7? (In this case any integer gte 7 will perform the same.)
Best,
--Chris
On Jun 26, 2014, at 3:10 AM, Stephe Pocock <zippyaus at yahoo.com> wrote:
> Hi
>
> We pretty much use the same code for all our FX pages. Ever since we moved from Filemaker 11 this has been a lot slower to load.
>
> I use the latest FX.php and FMalt
>
> I would greatly appreciate it if someone could review this code and let me know if there is anything out of the ordinary.
>
> <?php
>
> define('DEBUG', FALSE);
>
> include_once("../FX/FX.php");
> include_once("../FX/server_data.php");
> include_once("../FX/FMErrors.php");
>
> $TitleID=$_REQUEST['Initial'];
>
> $cat=new FX($serverIP,$webCompanionPort,'FMAlt');
> $cat->setDBData('FMOnline','TQS_Manual_PHP', 'ALL');
> $cat->SetDBUserPass ($webUN, $webPW);
> $cat->AddDBParam('Initial',$TitleID);
> $cat->AddDBParam('Reference','FMP');
>
> $cat->AddSortParam('Title','ascend');
>
> $catResult=$cat->FMFind();
> foreach ($catResult['data'] as $key => $catData)
>
> ?>
>
>
> <html>
> <head>
> <title>Forms, Manuals and Publications</title>
>
> </head>
>
> <body>
> <table width="600" border="0">
>
> <?php
> $checkHeader = NULL;
>
> foreach ($catResult['data'] as $key => $catData)
> {
> $Title = $catData['Title'][0];
> $URL = $catData['URL'][0];
> $target = $catData['c_URL_target'][0];
>
>
> echo "<tr valign='top'>\n
> <td width='20' height='15'>
> <div align='center'><img src='/Images/Bullet.png' width='9' height='12'> </div></td>\n
> <td><a href='$URL' target='_blank'>$Title</a> </td>\n
> </tr>\n";
>
> }
> // End the foreach loop
> ?>
> </table>
>
>
> </body>
> </html>
>
>
>
> There are less than 100 records and it takes up to a minute to load.
>
> We are using FMS13 on iis 2008R2.
>
> Thanks in advance.
>
> Stephen
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20140626/1163b4db/attachment-0001.html
More information about the FX.php_List
mailing list