AI Content Chat (Beta) logo

CHAPTeR 9 DXP PeRfORMANCe OPTIMIzATION Presentation Layer Performance Optimizations Table 9-4 shows the performance optimizations that were implemented at the presentation layer. Table 9-4. Presentation Layer Performance Optimizations Performance Improvement Comments Merging and minifying CSS and JS files • Merge all page level CSS (3 in total) and JS (18 in total) files. • JS files are taking the bulk in terms of page size (80% of total page size). Add all external JS files at the bottom of the page and • This will enable the browser to load CSS at top of page the Document Object model (DOM) and it is not blocked by JS files. • This will also help to load the CSS fast. Use CSS sprites and a CDN if feasible. CSS sprites • CSS sprites will reduce the number of method uses a single combined image and styles to image requests. render various image pieces. • CDNs (like Akamai) will improve the asset response times across geographies. Server layer performance optimizations The following performance optimizations were implemented for server side performance optimization: • The web modules implemented paginated query to only query 20 records, avoiding the full table data loads. • The query results module implemented pagination that loaded the results on demand using AJAX calls. • Nested loops (wherein a database query was invoked within a loop resulting in huge number of database calls) containing the database transactions were replaced. A query batching feature was used to avoid frequent database calls. 257

Building Digital Experience Platforms - Page 271 Building Digital Experience Platforms Page 270 Page 272