-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not detach child elements if parent element is about to be detached (
#2420) * Make a use_hook hook with the new Hook trait. * Implement Lifetime. * Rewrites function signature. * Only apply lifetime if there're other lifetimes. * Cleanup signature rewrite logic. * Rewrite hook body. * Port some built-in hooks. * Finish porting all built-in hooks. * Port tests. * Fix tests. * Migrate to macro-based hooks. * Fix HookContext, add tests on non-possible locations. * Fix stderr for trybuild. * Add 1 more test case. * Adjust doc location. * Pretty print hook signature. * Fix Items & std::ops::Fn*. * Add use_memo. * Optimise Implementation of hooks. * Use Box to capture function value only. * Detect whether needs boxing. * Add args if boxing not needed. * Enforce hook number. * Deduplicate use_effect. * Optimise Implementation. * Update documentation. * Fix website test. Strip BoxedHook implementation from it. * Allow doc string. * Workaround doc tests. * Optimise codebase & documentation. * Fix website test. * Reduce implementation complexity. * Destructor is no more. * Do not detach child element if parent element is about to be detached as well. * Fix tests.
- Loading branch information
Showing
11 changed files
with
58 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b7b28ba
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yew master branch benchmarks (Lower is better)
yew-struct-keyed 01_run1k
180.3315
276.214
0.65
yew-struct-keyed 02_replace1k
193.606
253.064
0.77
yew-struct-keyed 03_update10th1k_x16
452.2335
446.37
1.01
yew-struct-keyed 04_select1k
93.866
79.6895
1.18
yew-struct-keyed 05_swap1k
108.8545
95.8995
1.14
yew-struct-keyed 06_remove-one-1k
32.7375
32.419
1.01
yew-struct-keyed 07_create10k
2101.9480000000003
2735.821
0.77
yew-struct-keyed 08_create1k-after1k_x2
416.04
560.5615
0.74
yew-struct-keyed 09_clear1k_x8
208.642
250.0145
0.83
yew-struct-keyed 21_ready-memory
0.9634513854980468
0.9634513854980468
1
yew-struct-keyed 22_run-memory
1.5000953674316406
1.4578094482421875
1.03
yew-struct-keyed 23_update5-memory
1.4615478515625
1.5065078735351562
0.97
yew-struct-keyed 24_run5-memory
1.510845184326172
1.5065422058105469
1.00
yew-struct-keyed 25_run-clear-memory
1.1290321350097656
1.1290855407714844
1.00
yew-struct-keyed 31_startup-ci
1785.2385
1743.1039999999998
1.02
yew-struct-keyed 32_startup-bt
30.429999999999993
35.06999999999999
0.87
yew-struct-keyed 34_startup-totalbytes
367.962890625
364.2373046875
1.01
This comment was automatically generated by workflow using github-action-benchmark.