Unintended Consequences
The other day one of my old clients contacted me because an application I had developed for them (5+ years ago) was slow. My first step was to download New Relic to their server but I found their configuration wasn’t supported anymore. I had to start building a footer that displayed page rendering information (makes me even happier to use New Relic in my other projects) and what I found shocked me.
They have a list of vendors which are then picked in various select elements through the site. When we originally created the system they had ~100 vendors. In the past five years they’ve entered 1,500+ vendors. Some pages had multiple (in one case 10+) vendor selects which caused the page to be 35 MB of just option elements and because everything was written using classes it caused 15,000+ classes to be instantiated and then used. I do love PHPs speed though, on my local machine this still didn’t take more than a second to generate and it was really only a problem when using the page through the Internet.
As programmers it’s impossible to tell how our systems will be used. When we originally created this system we used the information they had given us to create the best system we could for their budget. Even now I wouldn’t have tested their system with as many vendors as they’ve managed to enter but it’s important for us to build systems that scale.
Scott Keck-Warren
Scott is the Director of Technology at WeCare Connect where he strives to provide solutions for his customers needs. He's the father of two and can be found most weekends working on projects around the house with his loving partner.
Top Posts
- Working With Soft Deletes in Laravel (By Example)
- Fixing CMake was unable to find a build program corresponding to "Unix Makefiles"
- Upgrading to Laravel 8.x
- Get The Count of the Number of Users in an AD Group
- Multiple Vagrant VMs in One Vagrantfile
- Fixing the "this is larger than GitHub's recommended maximum file size of 50.00 MB" error
- Changing the Directory Vagrant Stores the VMs In
- Accepting Android SDK Licenses From The OSX Command Line
- Fixing the 'Target class [config] does not exist' Error
- Using Rectangle to Manage MacOS Windows