http://bugs.winehq.org/show_bug.cgi?id=30653
Bug #: 30653 Summary: Deleting text from richedit controls extremely slow Product: Wine Version: 1.5.4 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: richedit AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com Classification: Unclassified
The attached program creates a richedit control containing $1 lines of text, then times how long it takes to delete the first 1000 lines. Results on my e7300 from running "wine delete.exe 5000": Builtin riched20: 97500 ms Native riched20: 1800 ms i.e. builtin is about 50 times slower than native. It gets worse fast as you add lines.
+relay shows InvalidateRect is called a bazillion times (like in bug 30614).
The attached patch optimizes ME_InvalidateMarkedParagraphs to only call InvalidateRect once per run of invalid paragraphs, and makes deletion merely slow instead of crazy slow.
http://bugs.winehq.org/show_bug.cgi?id=30653
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch, source, testcase Severity|normal |enhancement
http://bugs.winehq.org/show_bug.cgi?id=30653
--- Comment #1 from Dan Kegel dank@kegel.com 2012-05-11 21:37:09 CDT --- Created attachment 40126 --> http://bugs.winehq.org/attachment.cgi?id=40126 Tiny test program demonstrating the problem
http://bugs.winehq.org/show_bug.cgi?id=30653
--- Comment #2 from Dan Kegel dank@kegel.com 2012-05-11 21:39:36 CDT --- Created attachment 40127 --> http://bugs.winehq.org/attachment.cgi?id=40127 Rough patch which makes fewer InvalidateRect() calls
http://bugs.winehq.org/show_bug.cgi?id=30653
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
http://bugs.winehq.org/show_bug.cgi?id=30653
--- Comment #3 from Dan Kegel dank@kegel.com 2012-05-15 11:13:07 CDT --- Created attachment 40185 --> http://bugs.winehq.org/attachment.cgi?id=40185 More careful patch
Dylan suggested taking advantage of the fact that there should only be one bunch of marked paragraphs. While implementing that, I noticed a possible old bug: the original loop used item->member.para.next_para even on non-paragraphs, which is probably a no-no. This patch also gets rid of the spurious invaidates, and if you ask it to with +richedit_check, verifies its assumption that there is only one bunch of marked paragraphs.
http://bugs.winehq.org/show_bug.cgi?id=30653
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |10d800b6b805af0636a8aa9c955 | |12fde3093cf33 Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #4 from Dan Kegel dank@kegel.com 2012-05-18 15:04:46 CDT --- Fixed in today's git. Thanks, Dylan!
http://bugs.winehq.org/show_bug.cgi?id=30653
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org 2012-05-25 13:41:31 CDT --- Closing bugs fixed in 1.5.5.
http://bugs.winehq.org/show_bug.cgi?id=30653
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.4.x
http://bugs.winehq.org/show_bug.cgi?id=30653
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.4.x |---