emory-libraries / blacklight-catalog

1 stars 0 forks source link

Advance search page loads slow #1389

Closed tclayton33 closed 4 months ago

tclayton33 commented 5 months ago

Testers have noticed that the Advanced search page is loading very slowly. (https://blackcat-test.library.emory.edu/advanced) The actual search is executing fine; the problem seems to be limited to the "Advanced Search" link that takes you to the advanced search form (whether from the home page or from a results page). I'm counting an average of 6-12 seconds for the page to load. I tested in both Firefox and Chrome.

I'm not certain if this is just because this is the test server, or if this is something that is related to the Blacklight upgrade. I know that test server is generally slower than production, but this seems different, and seems specifically isolated to Advanced Search.

abelemlih commented 5 months ago

@tclayton33 I have looked into this performance issue and I can confirm that the advanced search page takes much longer to load than usual. The underlying issue is likely due to a change in how the views are rendered on the page (which is likely tied to the Blacklight upgrade).

I am currently looking for a solution to speedup the page load, either by fixing any major view rendering issues I find or by introducing a new caching mechanism to cache the page. I will keep you posted on the next step forward to resolve this issue.

abelemlih commented 4 months ago

@tclayton33 I discussed different solutions to this issue with Collin, and we came up with the following:

To fix this issue immediately, we will use caching to speedup page rendering and move page load from seconds to milliseconds. This approach is useful in this scenario since the content on this page is fairly static, and we will only need to expire the cache upon reindexing/deploying a new version.

In the near future, we will look into the following two options to assess the use of the Advanced search plugin for Blacklight, which we currently rely on to render the advanced search page:

tclayton33 commented 4 months ago

That approach sounds good. Thanks @abelemlih

abelemlih commented 4 months ago

@tclayton33 I deployed a fix for this issue to the Test instance, and it is ready for testing

tclayton33 commented 4 months ago

@abelemlih tested in firefox, edge, chrome and on phone with safari; in all cases except one the Advanced search page loaded extremely fast. My first attempt using chrome took 10 seconds. After I cleared the cache subsequent tests in chrome were also very fast. Do you think it is safe to say my first chrome attempt was relying on a cached page from yesterday's testing?

tclayton33 commented 4 months ago

closing ticket per Ayoub's explanation