[iOS]: anyTextHaveBeenModified performance
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 42/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- react-native
- Área
- mobile, performance
Línea de trabajo
Empieza localizando anyTextHaveBeenModified y su llamada desde textViewDidChange, y luego perfila la escritura en una entrada HTML de aproximadamente 3k caracteres. Revisa el procesamiento del color, los encabezados y los espacios de ancho cero descrito en el issue; se considera terminado cuando las ediciones de caracteres ya no provocan un retraso perceptible del cursor ni de la actualización del texto.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
At the moment, when working with a medium-sized text and typing quickly, the caret and text updates can feel noticeably laggy. This appears to be caused by anyTextHaveBeenModified being executed on every text change within the text view. Since this method iterates over the entire input range and processes blockquote and inline code colors, heading styles, and zero-width spaces, it is relatively expensive.
In practice, this results in a performance cost of approximately 25 ms per single character change for an HTML input of around 3k characters, which is not particularly large.
Proposed solution
- It may be worth reconsidering whether color handling is necessary inside textViewDidChange. Similar to the approach used in the foreground color styles PRs, this logic could potentially be handled elsewhere, with base colors restored in the same way if needed.
- Improper headings could likely be resolved in a single pass, rather than running separate logic for each heading style.
- At this point, it is unclear how best to handle zero-width spaces. However, with the new parser and serializer implementation, it may be unlikely for them to appear in the text view at all.
Expected behavior
Typing shouldn't be laggy
Screenshots
If applicable, add screenshots to help explain your problem.
Device (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
- Lenguaje dominante
- C
- Estrellas
- 1.4k
- Forks
- 67
- Merge medio
- 3 d 22 h
- PR fusionados (30 d)
- 8
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de software-mansion/react-native-enriched-html
-
HIGH level tiptap package advisoryPosiblemente ocupada @hejsztynx la tomó hace 16 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
software-mansion/react-native-enriched-html#802 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
software-mansion/react-native-enriched-html#618 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Support for `<raw-text-block>`Abiertoenhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
software-mansion/react-native-enriched-html#803 ·
Los mantenedores suelen responder en 2 días
-
Text immediately before an `<img>` sometimes fails to repaint on iOS after a screen revisit (`EnrichedText`)Posiblemente ocupada @hejsztynx la tomó hace 16 días. Abiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
software-mansion/react-native-enriched-html#798 · 4 comentarios ·
Los mantenedores suelen responder en 2 días
-
<img> wider than its rendering column fails to paint on Android — silently in isolation, with an "invalid measurement" error alongside any other text (not a decode-timing race)Posiblemente ocupada @hejsztynx la tomó hace 14 días. Abiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
software-mansion/react-native-enriched-html#797 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
Todos los issues de software-mansion/react-native-enriched-html
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
libsdl-org/SDL#16464 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
chore(gateway): emit INFO budget reserved/settled logs for proactivity v2 (chip task_2855f4ec)Abiertobackend
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
BasedHardware/omi#20940 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 Menos de una hora Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día