Performance Optimization
Alok Sharma
Learner, Enabler|AI | Generative AI & Cloud Solutions Expert | Digital Transformation Strategist | AI/ML Innovator / TOGAF? 9 Certified/ AWS 3X (Professional Architect /Security certified
As Michael Jordan said once, "You can practice shooting eight hours a day, but if your technique is wrong, then all you become is very good at shooting the wrong way. Get the fundamentals down, and the level of everything you do will rise. " It is true for software development as well. If we emphasize a little more on the fundamentals, most of the issues or rudimentary problems can be eradicated, including performance or security. Here, I am putting down some of the basic best practices and related aspects that may help in the performance optimization of the solution.
Basic Rules -
Certain rules should be kept in mind when optimizing performance:
Scope Definition
First and foremost, the performance matrix ( scope) must be defined. It can be started by defining technical and business use cases and the related scope and load information including each page and flow's Work-load model.
The next step is?key performance indicators (KPI)?need to be defined. Examples of common KPIs include:
Test Methodologies
The next step is defining test methodology, and It can be segregated into four types.
Measuring Performance?
There are two things one should keep in mind when dealing with performance improvements:
Load test -The thumb rule is "if you can not measure it, you can not improve it". Load test is to measure and see what might be causing bottlenecks. For Load testing, the selection of tools is one of the important steps. Following are some of the market leaders in this section.
After optimization, one needs to test again to confirm the impact.
Optimization
Any optimizations made must be tested to ensure they have:
Reporting
After completing, one needs to have an automatic report, so that people can have a holistic view of the state of the system after performance testing. It can include the following attributes.
Factors that may impact the Application's performance?
Performance Optimization Best practices?
Server-Side Optimizations
This can greatly reduce the size of HTTP responses and has the most impact. Compress as many file types as possible.?Tool suggestion-?Brotli
2. Minimize HTTP requests
While compression can save significant amounts of data, you can further cut down page load times by minimizing the number of HTTP requests. Some common techniques you can use are:
3.Use a CDN
Using a content delivery network can help reduce response times. A CDN is a collection of servers distributed across the globe. It aims to help deliver content to users faster by choosing the server closest to the user’s location. CDN can cache static assets, such as images, fonts, or PDF files.
Providers: Amazon Cloudfront, Akamai, Azure CDN, etc.
4.API/Services
Caching can drastically improve the performance of the application if configured optimally. By employing caching, one can reduce the GET queries on the databases and reduce the network calls. Starting from Object caching, it is used to store the processed data into a cache-store. The cached data will get served for the incoming requests.
Providers: Memcached, Redis cache, Ignite, EhCache, etc. These cache providers are available as part of the cloud provider as well.
As far as APIs are concerned, API results can be cached at APIGateway.?
领英推荐
5.Database best practices?
Relational databases are difficult to scale when compared to NO-SQL. Consider exploring NO-SQL databases when evaluating databases when possible, it should be considered after technical assessment of the project.?
Below are a few of the techniques helpful while tuning the relational database/Query optimization
Client-Side Optimizations
Optimize HTML
Optimize CSS
Optimize JavaScript
Optimize images
Network
Network configuration is one other key area where the performance of an application depends on.
Audit Tool Recommendations- Every digital business requires a regular audit. All of the tools listed below are free to use for regular auditing.
Lighthouse
Lighthouse?should be used as an audit tool to use. It’s built right inside Chrome. You can reach it through the Audits tab.
Webhint
Webhint?provides you with deep details not only on performance but other aspects as well, such as common pitfalls or security issues.
GTmetrix
Just like the previous two,?GTmetrix?helps you discover performance issues and provides you with optimization opportunities. It generates a report for you with the most impactful issues at the top.
Performance tab
The Performance tab in Chrome lets you analyze runtime performance. It provides you with all sorts of details, ranging from FPS drops to long-running scripts and how long it takes your site to render and paint everything.
Dynatrace and Appdynamics or other cloud-specific system health services - These are not free however, immensely useful for tracing the bottleneck in code or in heap. These must be use for checking the health of the system on regular basis.
Conclusion- As we all know, performance is a vital attribute in the success of the platform. It is extremely important for all the business domains, like eCommerce (B2B/B2C)where the performance of the platform can impact the conversion rate and eventually the direct business and sales.
Resources -
https://www.dhirubhai.net/redir/general-malware-page?url=https%3A%2F%2Fwww%2ekeycdn%2ecom%2Fblog%2Fwebsite-performance-optimization
https://medium.com/walmartglobaltech/an-approach-to-application-performance-optimisation-cdb8ea192cdf
https://medium.com/geekculture/the-fundamentals-of-software-development-the-core-process-9ffaa6f8fabf
https://www.webtips.dev/10-critical-performance-optimization-steps-you-should-take
https://josephjguerra.medium.com/optimizing-website-performance-faba64a1dcff