Putting together a great custom web publishing (CWP) solution only to find out that it doesn’t perform that great when hosted can be a frustrating issue for a developer (and client) to face. Fortunately there are a few things you can consider that will speed up your CWP solution and return it in good shape.

1.  Consider your data

  • Large sets of data
    If you have a need to display a large set of data (e.g. a found set of 1,000 records), which would you think is faster: a) loading all 1,000 records into a single list view or b) adding pagination to display a list of 50 results at a time? Best practices reveal that page loading time is an important factor in user acceptance, so planning accordingly for large found sets could drastically improve performance. Check out this Web video on CWP pagination using the PHPagination package.
  • Calculated values
    Remember that any un-stored calculation or summary field that you pull into CWP is going to have to calculate for all of your found set on the server before it’s sent as a result to you. This can cause a massive amount of delay in load time as the browser waits for the server to deliver data. Take the time to consider what fields you will be pulling, and if calculations are required consider either caching the information or changing the calculation context so it’s able to be stored.
  • Container Contents
    While FMS12 introduced plenty of new features in the container objects, you can still expect a performance hit when loading container field contents across to CWP. The more you load, the slower it will go. A few suggestions to optimize here would be to omit container contents from list views and keep your container contents on form views.

    You might also want to optimize your content before it gets stored in FM, using a service like smush.it for images or MP3Resizer for audio files. Lastly, consider doing away with any gallery style pages that would require loading all container images related to a record. Instead, try coding previous/next image links.

2.  Consider your user interface

  • Clean up before CWP
    Your user interface (UI) should be completed before adding in the CWP component. W3C is an excellent resource to validate your code. If your UI takes a long time to load on its own, then it’s not going to get any better when you add CWP to the mix. Lightweight design also happens to be good for viewing data anyways!

    One other thing you might consider is code compression for your HTML/CSS/PHP code. There are a number of free compressors out there that will minify your code. Shaving off a few lines of code never hurts in Web development, just remember to keep a working uncompressed copy of your code for changes!

  • Start Spartan
    I’m not talking about the Greeks here, but it is very important to only take what you need from CWP into your application. Really grasp what the need of the application is, and introduce the minimal amount of fields, data and querying that meets that need. As with regular FileMaker development, it’s sometimes easy to get carried away in CWP to try and impress clients.

3.  Consider your connection

  • Hosting
    When you choose to host your own database, you have to take into account the extra processor and memory demands that a CWP application may bring. Even more so if you are dual-using a Web server on the same OS that FileMaker is running on.

    Remember that since the data needs to be processed on the FileMaker server before being handed off to the web server, your drives, processor and RAM all affect performance. Virtual and managed FileMaker hosting are gaining popularity. Make sure to thoroughly test your host and grill them about their CWP performance thoughts before making a choice. Remember with hosting, you’re sharing your resources with everyone else on that host.

  • Bandwidth
    Hosting your own database with CWP is great for LAN applications (and possibly the fastest option as well), however; as soon as you add WAN to the mix, you’re looking at a new set of factors that affect performance. If you want to host your own, you’ll want to max out your connection speed with your ISP. Your upload speed will have a direct effect on your performance.

    There are numerous FileMaker hosting companies that support CWP and offer free trials for you to test against. If you find a decent host you might opt to host it there, as the price per month may rival the upgraded price to your Internet connection and static IP. You can use tools like bandwidth tests and wireshark to monitor your bandwidth capacity and needs.

With a little bit of elbow work, you can make some pretty quick CWP solutions to meet the needs of your clients.