Optimizing the frontend
Until now, we learned about the various issues that may hamper the performance of the frontend. Now, it's time to take a look at how we can reduce the performance impact on the frontends and make them fast and responsive in an enterprise grade environment.
Optimizing resources
The first and foremost optimization that we are going to take a look at is the optimization of resources that a particular page loads when it is requested. For this, consider the following code snippet from the user data display page in the admin panel, which is responsible for displaying a table of users in the database:
<table> {% for user in users %} <tr> <td class="user-data-column">{{ user.username }}</td> <td class="user-data-column">{{ user.email }}</td> <td class="user-data-column">{{ user.status }}</td> </tr> {% endfor %} </table>
So far, so good. As we can see, the code snippet just loops over a user's object and...