bakape 2b584ca37b
Optimise vtag (#1447)
* yew/vtag: remove needless indirection

* yew/vtag: reduce VTag memory footprint

* Revert "yew/vtag: remove needless indirection"

This reverts commit 7c59c61e0e6b32261fe79d9b48f786bd880aed29.

* yew/vtag,yew-macro: optimise attribute setting and memory usage

* yew/vtag,yew-macro: reduce string memory footprint and use static strings more

* yew,yew-macro: opportunistically use static memory for VText

* yew/vtag: use String instead of Box<str>

* yew-macro: remove one extra iteration

* yew/vtag: remove API extension for textarea

* yew/vtag: remove extra calls

* yew-macro: preconstruct StringRef for class literals

* yew-macro: construct non-dynamic VTags in-place

* yew-macro: Insert class and href into attrs in-place

* *: run stable checks

* yew/vtag: use key-pair vector for attributes

* yew/macro,yew: use trait associated methods with paths, where possible

* Update yew/src/virtual_dom/vtag.rs

Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com>

* Update yew/src/virtual_dom/vtag.rs

Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com>

* Update yew/src/virtual_dom/vtag.rs

Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com>

* Update yew/src/virtual_dom/vtag.rs

Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com>

* Update yew/src/virtual_dom/vtag.rs

Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com>

* Update yew/src/virtual_dom/vtag.rs

Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com>

* yew/vtag: comment clarification

as suggested by @teymour-aldridge

* yew/vtag: fix added test failing

* yew/vlist: revert removing key

* yew/vtag,yew-macro: stash VTagInner changes for later

* yew/vtag: restore diff_attributes() generating a patch list + add bechmarks

* yew: fix becnhmarks running with std_web

* yew: remove Href

* yew/vtag: fix comment changes

* examples: fix trait impl

* yew: swap Stringref with Cow

* examples: remove redundant clone

* ci: fix stable check

* yew/VText: remove needless constructor

* *: remove needless trait full paths

* yew/benchmarks: add IndexMap attribute diff becnhmark

* yew-macro: fix stderr regressions

* yew: convert Attributes to enum

with variants optimised for both the html! macro and the VTag API

* yew/benchmarks: move feature guard

* Update examples/common/src/markdown.rs

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>

* Update examples/common/src/markdown.rs

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>

* Update examples/common/src/markdown.rs

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>

* Update examples/common/src/markdown.rs

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>

* Update examples/common/src/markdown.rs

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>

* examples: remove unused import

* Apply suggestions from code review

Co-authored-by: Justin Starry <justin.m.starry@gmail.com>

* yew-macro: rebuild stderr

* yew-macro: accept Into<Cow> for dynamic tags

* yew-macro: remove unneeded {} wrapping

* yew: revert doc comment

* yew/vtag: clean up attribute type conversion

* yew-macro: remove now supported literal failures

Co-authored-by: Teymour Aldridge <42674621+teymour-aldridge@users.noreply.github.com>
Co-authored-by: Justin Starry <justin.starry@icloud.com>
Co-authored-by: Justin Starry <justin.m.starry@gmail.com>
2020-08-22 18:45:02 +08:00
..
2020-08-22 18:45:02 +08:00
2020-08-15 22:04:41 +08:00
2020-07-10 11:18:21 +08:00