[iOS]: anyTextHaveBeenModified performance
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- react-native
- Lĩnh vực
- mobile, performance
Hướng nghiên cứu
Bắt đầu bằng cách xác định anyTextHaveBeenModified và lệnh gọi của nó từ textViewDidChange, sau đó lập hồ sơ hiệu năng khi nhập trong một trường HTML có khoảng 3k ký tự. Xem xét việc xử lý màu sắc, tiêu đề và khoảng trắng độ rộng bằng không được mô tả trong issue; được xem là hoàn tất khi việc chỉnh sửa ký tự không còn gây ra độ trễ đáng kể đối với con trỏ hoặc việc cập nhật văn bản.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C
- Star
- 1.4k
- Fork
- 67
- Merge trung bình
- 3 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của software-mansion/react-native-enriched-html
-
HIGH level tiptap package advisoryCó thể đã có người làm @hejsztynx đã nhận 16 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
software-mansion/react-native-enriched-html#802 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
software-mansion/react-native-enriched-html#618 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Support for `<raw-text-block>`Đang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
software-mansion/react-native-enriched-html#803 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Text immediately before an `<img>` sometimes fails to repaint on iOS after a screen revisit (`EnrichedText`)Có thể đã có người làm @hejsztynx đã nhận 16 ngày trước. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
software-mansion/react-native-enriched-html#798 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
<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)Có thể đã có người làm @hejsztynx đã nhận 14 ngày trước. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
software-mansion/react-native-enriched-html#797 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của software-mansion/react-native-enriched-html
Issue tương tự
-
rc_runtime_activate_richpresence leaves a half-initialised entry when the buffer allocation failsĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
RetroAchievements/rcheevos#558 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
libsdl-org/SDL#16464 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
chore(gateway): emit INFO budget reserved/settled logs for proactivity v2 (chip task_2855f4ec)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbackend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
BasedHardware/omi#20940 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày