Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

144
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda