Reduce allocations and copies in syntax_highlight #29

Merged
merged 6 commits into from Dec 30, 2016

Projects

None yet

2 participants

@mbrubeck
Contributor

No description provided.

mbrubeck added some commits Dec 30, 2016
@mbrubeck mbrubeck Don't clone the original HTML string in syntax_highlight 471185a
@mbrubeck mbrubeck Change .fold() to a for loop 03d822a
@mbrubeck mbrubeck Postpone cloning ParseState data until necessary 5a6831c
@mbrubeck mbrubeck Avoid cloning quick_xml::Event values 90bb727
@mbrubeck mbrubeck Avoid copying content in syntax_highlight.
This required restructing the code significantly to avoid spurious
borrow checker errors.  (Non-lexical lifetimes would allow the original
code to compile without unnecessary copying.)
865bedb
@mbrubeck mbrubeck Avoid cloning SyntaxDefinition values.
2356461
@chriskrycho chriskrycho merged commit efbd722 into chriskrycho:master Dec 30, 2016

1 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@chriskrycho
Owner

This is awesome. Thanks a ton, @mbrubeck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment