Bug 34237

Summary: Huge plain text pastes are slow
Product: WebKit Reporter: Enrica Casucci <enrica>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: mitz, mjs, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch2
none
Patch3 mjs: review+

Description Enrica Casucci 2010-01-27 19:34:04 PST
The performance of plain text pastes is highly non-linear.
Comment 1 mitz 2010-01-27 20:03:15 PST
<rdar://problem/5195056>
Comment 2 Enrica Casucci 2010-01-27 20:04:54 PST
Created attachment 47586 [details]
Patch
Comment 3 WebKit Review Bot 2010-01-27 20:12:21 PST
Attachment 47586 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebCore/ChangeLog:8:  Line contains tab character.  [whitespace/tab] [5]
WebCore/ChangeLog:10:  Line contains tab character.  [whitespace/tab] [5]
WebKit/mac/ChangeLog:12:  Line contains tab character.  [whitespace/tab] [5]
Total errors found: 3


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Enrica Casucci 2010-01-27 21:07:24 PST
Created attachment 47589 [details]
Patch2

Stripping unwanted tabs from ChangeLog files.
Comment 5 Maciej Stachowiak 2010-01-28 03:38:41 PST
Comment on attachment 47589 [details]
Patch2

I'm concerned about the Mail-specific workaround. Is that something Mail needs to keep doing? Can we get them to change? If so, that special case should probably have a version check.The WebCore part of the speedup looks good to me (and is an awesome idea).
Comment 6 Enrica Casucci 2010-01-28 09:02:33 PST
(In reply to comment #5)
> (From update of attachment 47589 [details])
> I'm concerned about the Mail-specific workaround. Is that something Mail needs
> to keep doing? Can we get them to change? If so, that special case should
> probably have a version check.The WebCore part of the speedup looks good to me
> (and is an awesome idea).

I agree with you. I've been talking to mail about this and they seem ok with fixing it for the next version.
I should probably change the code to do the workaround only up to the current version.
Any thoughts?
Comment 7 Maciej Stachowiak 2010-01-28 13:20:03 PST
(In reply to comment #6)
> (In reply to comment #5)
> > (From update of attachment 47589 [details] [details])
> > I'm concerned about the Mail-specific workaround. Is that something Mail needs
> > to keep doing? Can we get them to change? If so, that special case should
> > probably have a version check.The WebCore part of the speedup looks good to me
> > (and is an awesome idea).
> 
> I agree with you. I've been talking to mail about this and they seem ok with
> fixing it for the next version.
> I should probably change the code to do the workaround only up to the current
> version.
> Any thoughts?

I think that's a good idea. We usually use a linked on-or-after check for things like that.
Comment 8 Enrica Casucci 2010-01-28 14:30:34 PST
Created attachment 47648 [details]
Patch3

Limiting the OS versions for the workaround.
Comment 9 Maciej Stachowiak 2010-01-28 17:30:10 PST
Comment on attachment 47648 [details]
Patch3

r=me
Comment 10 Enrica Casucci 2010-01-28 18:16:39 PST
Committed revision 54036.