Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Box VTag to reduce size disparity between VNode variants #675

Merged
merged 40 commits into from
Oct 14, 2019

Conversation

hgzimmerman
Copy link
Member

fixes #571

(breaking change)

@jstarry
Copy link
Member

jstarry commented Oct 13, 2019

Thanks @hgzimmerman! Looks like the clippy warning was complaining about VTag not VComp though 😉

@hgzimmerman
Copy link
Member Author

hgzimmerman commented Oct 13, 2019

Wow, missed that one, will update with the appropriate change.

This is a little harder than it appeared at first glance, I'll take some time and see if I can come up with a satisfactory change.

As things are right now, the performance benefits of moving a smaller item into a function by boxing a variant may be dwarfed by the large amount of boxing/unboxing that will have to be done.

It may make sense to delay this change until benchmarks exist so that the effect of this change can be verified to be a positive one.

Edit:
For whatever reason, I figured the refactoring I needed to do would result in many allocations/deallocations. It doesn't add any more beyond the initial VTag allocation needed now. I think my statement about measuring performance before merging is still relevant.

@hgzimmerman hgzimmerman changed the title Box VComp to reduce size disparity between VNode variants Box VTag to reduce size disparity between VNode variants Oct 13, 2019
@jstarry
Copy link
Member

jstarry commented Oct 14, 2019

Looks good! Can you please rebase though and remove the clippy allow I added recently? I also enabled clippy in CI so we can verify that this fix passes CI 😄

hgzimmerman and others added 16 commits October 14, 2019 19:05
Fixes yewstack#685

Address deprecations warnings in the examples directory:

warning: trait objects without an explicit `dyn` are deprecated
* Bump wasm-bindgen to 0.2.50

* Update Cargo.toml

* Update Cargo.toml
* childs -> children

* precursor -> previous_sibling

* cargo fmt and name changes
* Optimize the default `change` implementation

Return `false` if `Self::Properties` has a value of `()`.

* Use TypeId for checking Properties == ()
* Forbid missing debug implementations

* someday I'll remember to run cargo fmt before pushing the first time

* add debug for other format types

* derive debug for HandlerId
* Rework travis cache and fix cargo-update

* Split examples out of main workspace
@jstarry jstarry merged commit 5056b84 into yewstack:master Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clippy: large size difference between variants
5 participants