Hi team,
We have a news article publishing website with a lot of html coming from server which we inject into our Next.js website using dangerouslySetInnerHTML. The said html has a lot of anchor tags leading to external website, internal url with target _blank and some hashes.
Going through the various articles and guides available online, we have setup our Google analytics account to track the INP events.
We are based in India hence our user base is 75% Mobile and much of that constitutes of mid or low end devices.
After analysing the data, we can see that a majority of INP is caused by the Anchor tags. which we pinned down to the ones with hashes.
We initially weren't able to reproduce the INP Issues on our devices, but throttling the CPU to 6x and enabling hardware concurrency in the performance panel of Dev tools gave us results close to those of our users.
After plenty tweaking and trials we decided to check INP for raw html file with the hash anchor tag functionality.
It is kind of disheartening to see that such a trivial code is still causing INP. The real life use cased have way more DOM elements and CSS which only make the page slower.
Is there something on our end we can work on to fix this issue.
Thanks an Regards
Gandharv