3 Replies Latest reply on Mar 9, 2012 2:57 AM by cns

    Slow responses of PHP Filemaker's API

    cns

      Hello,

       

      I'm working on a web view of my records, PHP script.

       

      The DB is firstly MSSQL 2005 on a database server, but we manage our data with another server, FileMaker Server 10 equipped.

      And I'm accessing the layout with the PHP Filemaker's API from our webserver.

       

      It works well but it's so slow! Up to 30s to load a page with about 250 records. (It's about 10 to load just one.)

      Browsing records in a Filemaker client on any of our computers is smooth. It's only when accessing it through the API.

       

      Is anyone had already this kind of issue? Any help will be much appreciated.

       

      Best Regards,

      Sébastien

      Computer and Network Services @ ISU

        • 1. Re: Slow responses of PHP Filemaker's API
          mdenyse

          Sébastien,

           

          250 records an be considered 'a lot' if you've got lots of data in the layout you're pulling from. Also, unstored calcs or even summary(!) fields can slow things down. Does the layout you're using contain only the fields required for your PHP code? If not, remove them. Also, do you really need to pull 250 records at once?  Could you not instead use a 'paged' approach where you show 10 or 20 records at a time?

          1 of 1 people found this helpful
          • 2. Re: Slow responses of PHP Filemaker's API
            Malcolm

            I'm working on a web view of my records, PHP script.

             

            The DB is firstly MSSQL 2005 on a database server, but we manage our data with another server, FileMaker Server 10 equipped.

             

            And I'm accessing the layout with the PHP Filemaker's API from our webserver.

             

            Let me get this right. You have the data stored in MS SQL which you access in FMPro client via ESS and now you are building a web interface which talks to FMS Web publishing engine? If that is the case, why not talk directly to the SQL data source? PHP makes that sort of connection pretty easy.

             

            In any case, the basic trick for CWP is to create layouts which provide the context for your actions. Those layouts should only carry the fields that are needed for the task and no more. 

             

            The API even supports the use of several layouts in a single command, eg, You want to search all fields, so provide a layout which contains many fields for performing a search, but you only need a few fields (title, date, id) to create list of results, so provide a layout with only those three fields.

             

            Malcolm

            1 of 1 people found this helpful
            • 3. Re: Slow responses of PHP Filemaker's API
              cns

              Hello,

               

              Thanks a lot for your advices.

               

              @Mark DeNyse > For paging, it's already done: 15 records displayed at a time, skip for others.

               

              > There is no field that I don't need on the layout, exept the LastUdateTime and LastUpdateBy.

               

              @Malcolm > For accessing directly MSSQL, I can't because there are some calculated fields related to linked FM databases.

               

               

              Kind Regards,

              Sébastien