opentargets / issues

Issue tracker for Open Targets Platform and Open Targets Genetics Portal
https://platform.opentargets.org https://genetics.opentargets.org
Apache License 2.0
12 stars 2 forks source link

Using the search is very slow in Safari #3083

Closed LucaFumis closed 6 months ago

LucaFumis commented 1 year ago

Describe the bug As first observed by @d0choa, when using the search in the platform, the UI becomes very slow and unresponsive. As the user types the term to be searched, the letters appear very slowly on screen. This is observed in Safari only.

Observed behaviour Go on the platform and type something in the search bar. The search UI is very laggy: the typed word appears slowly one letter at the time.

Expected behaviour The searched term should be appear as I type. Search results should be displayed pretty quickly. This is worst on certain pages: target profile is particularly bad, downloads page almost unnoticeable.

To Reproduce Steps to reproduce the behaviour:

  1. Go to https://platform.opentargets.org/target/ENSG00000091831
  2. Click on search bar and start typing.
  3. Notice the slow UI.

Additional context At first it was thought that the search would fire a request for each letter of the search term (which is true if the user types very slowly). Actually the search is normally fired twice, regardless of browser: once after a few letters, then at the end of the search term. This however doesn't seem to be the problem. It has been observed that on simple pages (e.g. downloads page) the search UI behaves normally. On busy/complex pages like target profile, the problem is obvious. Remove all but a couple of widgets and the search works correctly: @carcruz noted that perhaps React is triggering some re-rendering of all widgets at every keystroke.

d0choa commented 1 year ago

🤯

carcruz commented 1 year ago

@chinmehta and I discovered that the bug is not only related to Safari. Due to an implementation issue, we currently face a bug in all browsers.

From the FE-team perspective, the best approach is to re-architect the Seach component completely. I suggest expecting this to be done by the 23.11 release, and if it is possible to finish it and test it before the release, we can do a soft release to production.

We did develop this user flow and tech requirements that will be used to structure the feature: USER FLOW Tech Requirements Actions State

prashantuniyal02 commented 11 months ago

The new search does not seem to lag in dev platform or dev PPP in chrome, safari or firefox.

prashantuniyal02 commented 11 months ago

Feedback: