Bug 139034 - Avoid String concatenation with line break iterator
Summary: Avoid String concatenation with line break iterator
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-24 14:44 PST by Antti Koivisto
Modified: 2014-11-24 16:23 PST (History)
6 users (show)

See Also:


Attachments
patch (13.90 KB, patch)
2014-11-24 14:53 PST, Antti Koivisto
zalan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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