Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

142
Views
Performance optimization for long text in react

In my app user can make comments in various different ways (e.g. from email). To limit the length of comment is not an option. Some real comments are several millions of chars long which makes Comment component to render them around 2-4 seconds.

Is there any known way of optimization I can use to reduce this time?

Comments can be HTML or plain text.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The optimal way to do this is to set a maximum initial render to the comment let us say 30 chars this will go for all of the next solutions

Solution 1:

then add a see more... button to let the user selectively expand the desired comment.

Solution 2:

you can also make a separate view to the comment if possible

another page/ view to render the full comment


if the above 2 solutions don't fit then you will have to deal with the loading time and add extra Loaders/ indicators to help the user assess the waiting time

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!