ColoredCow / portal

A hub-and-spoke platform for organizations to effectively manage their operations and data. Uses GSuite.
MIT License
55 stars 51 forks source link

Slow loading of HR recruitment page on the Portal #3113

Open Harshvardhan80 opened 1 year ago

Harshvardhan80 commented 1 year ago

Describe the task The HR recruitment page on the portal is experiencing significant performance issues, with page load times taking 10+ seconds. This slow loading makes it difficult and frustrating to use the page effectively.

Steps to Reproduce:

  1. Access the HR recruitment page on the portal. Screenshot 2023-05-31 194505

  2. Observe the significant delay in page load times.

Expected behaviour The HR recruitment page should load within a reasonable timeframe, preferably under a few seconds, to ensure smooth user interaction.

References Screenshot 2023-05-31 195223

Ayush8923 commented 1 year ago

Solution to solve this problem:-

As far as I can check there is a lot of queries are running when the HR recruitment page is open. In the hr_application table, if there is a 150 - 200 rows in that table so the minimum time of the page is 1 - 2 seconds. And If there is 10,000 + data in that table so the minimum time of the page is open is 14 sec. So the total queries 11101 queries are executed. I think there are also unnecessary queries we can remove the ones we don't need. So we need to optimize the index function of the ApplicationController.

deepankar-sajwan commented 1 year ago

@Ayush8923 as per the testing done is the portal it is tasking around 3-4 seconds to load the HR recruitment page. If the expected time for loading HR recruitment page will be between 3-4 seconds, then you can deploy the feature on the production

Ayush8923 commented 1 year ago

@Ayush8923 as per the testing done is the portal it is tasking around 3-4 seconds to load the HR recruitment page. If the expected time for loading HR recruitment page will be between 3-4 seconds, then you can deploy the feature on the production

Thanks, @deepankar-sajwan. Yes. Now it is taking 2 -3 seconds which is correct as compared to earlier. We will do more code cleanup and optimization in it, so I think it will be better.

deepankar-sajwan commented 1 year ago

Reference

@Ayush8923 you can proceed with the code deployment