But...improving the performance of your legacy application doesn’t have to be a big investment - we improved the page load time of a legacy application by 50% in 2 days, just by tackling the quick wins.
How did we do it? To discover your quick wins, begin with a goal, then leverage modern technology to find your surface level-problems and develop simple solutions.
Having an objective to guide and direct your investigation will help focus your efforts and provide you with a starting point. In this case, our goal was to understand why certain pages took significantly longer to load than others, especially when similar data was being loaded elsewhere in the application with no problems.
Find a tool that will help you achieve what you need with the limitation of the code you are working with. We were unable to perform local testing, had limited access to our data source and all development diagnosis had to be performed by logging out of the UAT server. We utilised NewRelic to trace, capture and analyse surface level functions as it is easy to get set up and it runs with minimal impact. NewRelic also has built-in support for automatically capturing basic information about web requests, this includes information such as the length of time taken to complete long, external calls (like database requests) without us needing to handle the raw data or run other programs.
The aim here is to find and solve problems that will give you the most return on investment. We began by adding traces to relevant functions, these are generally functions that seem like they’re doing something complex enough to drive the page load time up. Sometimes it can be a guessing game, sometimes it’s fairly obvious. Our general rule is that if there is any function that makes a call to another service or database, put a trace on it. Once your traces are in place, run your functions and perform some analysis to find the key culprits impacting your performance time. In this case, the culprits were caching, database queries and logging operations.
Performance tuning can be a never-ending battle, it’s important to remember not to over-optimise and to stick to performance fixes that don’t come at the cost of increased complexity. Ensure that you are aware of the intent of the code and any dependencies it may have before making changes. Try and avoid any performance changes that will alter business logic or change the user experience of the application. Make sure you don’t get bogged down on any individual change and stay focused on the changes that impact your real pain point. In this case, we optimised the caching, tweaked wasteful database queries and changed logging so it didn’t affect wait times. This enabled us to reduce the page load speed from 2 minutes to 30 seconds.
By keeping your solutions straightforward and utilising tools to enhance your investigation, there is a good chance you will discover a number of improvements that can be made without having to invest in more significant changes.
In saying this, sometimes problems get complicated and require out of the box thinking to tackle them, and without past experience, it can be a challenge to spot even the simple stuff. If you’d like us to help you identify the quick wins, or even tackle the harder stuff - get in touch!
Improving the performance of your legacy application doesn’t have to be a big investment, get in touch if you'd like us to help improve your legacy application.