http://bugs.winehq.org/show_bug.cgi?id=30614
Bug #: 30614 Summary: Builtin richedit extremely slow at appending text when window is hidden Product: Wine Version: 1.5.2 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: richedit AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com Classification: Unclassified
While looking into bug 30593, I discovered that hidden richedit controls were way slower than visible ones at appending text. Running the attached test program with perf record wine hidden_richedit.exe perf report showed some time in ME_InvalidateMarkedParagraphs. +relay showed that function calling InvalidateRect many, many times. Adding a trace showed that most of the calls were redundant, and covered increasingly offscreen regions. Native riched20 works around the problem.
The attached kludge patch skips the offscreen InvalidateRects, and makes the test program run in a reasonable amount of time with builtin riched20. (Not quite as fast as native riched20, but tolerable.)