wxWidgets/include/wx/richtext
Mehmet Soyturk 3e6ae97e89 Optimize wrapping long lines in wxRichTextCtrl
When one inserts one big line to a wxRichTextCtrl that is too long (say 300k words of average size 9), then wxRichTextCtrl could freeze for a few seconds. It could also freeze again when the control is resized (such that word wrapping is triggered again).

Problem: `wxRichTextParagraph::AllocateLine(int pos)` can be called many times. Each call triggers `m_cachedLines.Item(pos)`, which traverses the linked list. As a result we get quadratic time complexity.
In this commit, we improve the function by also caching the lines in a vector, which supports random access in O(1) time.
2021-09-17 09:19:48 +03:00
..
bitmaps
richtextbackgroundpage.h
richtextborderspage.h
richtextbuffer.h Optimize wrapping long lines in wxRichTextCtrl 2021-09-17 09:19:48 +03:00
richtextbulletspage.h
richtextctrl.h
richtextdialogpage.h
richtextfontpage.h
richtextformatdlg.h
richtexthtml.h
richtextimagedlg.h
richtextindentspage.h
richtextliststylepage.h
richtextmarginspage.h
richtextprint.h
richtextsizepage.h
richtextstyledlg.h
richtextstylepage.h
richtextstyles.h
richtextsymboldlg.h
richtexttabspage.h
richtextuicustomization.h
richtextxml.h