Bug 139034

Summary: Avoid String concatenation with line break iterator
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, koivisto, kondapallykalyan, zalan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch zalan: review+

Description Antti Koivisto 2014-11-24 14:44:57 PST
Use LazyLineBreakIterator::setPriorContext to move between segments.
Comment 1 Antti Koivisto 2014-11-24 14:53:43 PST
Created attachment 242174 [details]
patch
Comment 2 zalan 2014-11-24 15:36:00 PST
Comment on attachment 242174 [details]
patch

Looks good. r=me(provided there's no significant performance hit with the iterator change)
Comment 3 Antti Koivisto 2014-11-24 16:22:58 PST
https://trac.webkit.org/r176528
Comment 4 Antti Koivisto 2014-11-24 16:23:51 PST
line-layout-long-long-text.html went from

    mean: 80.41964673536093 runs/s
    median: 80.5499174535072 runs/s
    stdev: 0.6590877774334845 runs/s
    min: 78.8112513308298 runs/s
    max: 81.26653108623233 runs/s

to

    mean: 87.01240050592219 runs/s
    median: 87.00959276489445 runs/s
    stdev: 0.38577332225810396 runs/s
    min: 86.46174424670227 runs/s
    max: 87.5463699183578 runs/s