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

ReactiveScope backlink to parent for finding contexts #223

Merged
merged 2 commits into from
Sep 6, 2021

Conversation

lukechu10
Copy link
Member

@lukechu10 lukechu10 commented Sep 6, 2021

This adds a weak backlink for each ReactiveScope to its parent scope. This will allow using contexts after the initial render because context lookup will walkup the backlinks instead of the currently active scope stack.

@lukechu10 lukechu10 added performance Performance related context labels Sep 6, 2021
@github-actions
Copy link

github-actions bot commented Sep 6, 2021

Finished dev [unoptimized + debuginfo] target(s) in 0.01s
 Running `target/debug/results_diff`

Benchmark Report

  • wasm-bindgen: the performance goal
  • baseline: performance of sycamore-baseline (typically latest master)
  • update: performance of sycamore (typically recent changes)
  • diff: measures the improvement of update over the baseline
@@                         Performance Diff                          @@

##                       | wasm-bindgen | baseline |  update |  diff ##
#######################################################################
- 01_run1k               |       106.80 |   132.39 |  139.03 |   +5.02%
- 02_replace1k           |       125.65 |   145.52 |  151.12 |   +3.85%
  03_update10th1k_x16    |       300.62 |   312.35 |  313.67 |   +0.42%
+ 04_select1k            |        38.89 |    62.35 |   50.07 |  -19.70%
+ 05_swap1k              |        76.44 |    84.38 |   75.21 |  -10.86%
+ 06_remove-one-1k       |        27.40 |    28.20 |   26.68 |   -5.41%
  07_create10k           |      1073.20 |  1426.88 | 1416.01 |   -0.76%
  08_create1k-after1k_x2 |       251.18 |   288.97 |  288.53 |   -0.15%
  09_clear1k_x8          |       186.01 |   200.74 |  200.09 |   -0.33%
  21_ready-memory        |         1.03 |     1.02 |    1.02 |   -0.00%
  22_run-memory          |         1.51 |     1.84 |    1.84 |   -0.00%
  23_update5-memory      |         1.83 |     2.12 |    2.12 |   -0.00%
  24_run5-memory         |         2.11 |     2.37 |    2.37 |   -0.00%
  25_run-clear-memory    |         2.25 |     2.29 |    2.29 |   -0.17%
+ 31_startup-ci          |      1819.40 |  2033.23 | 1958.86 |   -3.66%
+ 32_startup-bt          |        69.92 |   122.07 |   87.95 |  -27.95%
+ 34_startup-totalbytes  |       197.35 |   344.05 |  296.14 |  -13.93%

Workflow: 1207100134
Adding new commits will generate a new report

@github-actions
Copy link

github-actions bot commented Sep 6, 2021

Finished dev [unoptimized + debuginfo] target(s) in 0.01s
 Running `target/debug/results_diff`

Benchmark Report

  • wasm-bindgen: the performance goal
  • baseline: performance of sycamore-baseline (typically latest master)
  • update: performance of sycamore (typically recent changes)
  • diff: measures the improvement of update over the baseline
@@                         Performance Diff                          @@

##                       | wasm-bindgen | baseline |  update |  diff ##
#######################################################################
  01_run1k               |       115.81 |   153.44 |  153.21 |   -0.15%
+ 02_replace1k           |       135.91 |   168.72 |  160.39 |   -4.94%
+ 03_update10th1k_x16    |       306.14 |   348.57 |  336.20 |   -3.55%
+ 04_select1k            |        45.83 |    56.66 |   49.15 |  -13.26%
+ 05_swap1k              |        75.52 |    83.39 |   80.27 |   -3.74%
+ 06_remove-one-1k       |        28.43 |    31.10 |   28.54 |   -8.22%
+ 07_create10k           |      1123.29 |  1605.03 | 1534.39 |   -4.40%
+ 08_create1k-after1k_x2 |       268.34 |   334.51 |  302.79 |   -9.48%
  09_clear1k_x8          |       198.66 |   207.61 |  205.87 |   -0.84%
  21_ready-memory        |         1.03 |     1.02 |    1.02 |   -0.00%
  22_run-memory          |         1.51 |     1.84 |    1.84 |   +0.01%
  23_update5-memory      |         1.83 |     2.12 |    2.12 |   +0.00%
  24_run5-memory         |         2.11 |     2.37 |    2.37 |   -0.03%
  25_run-clear-memory    |         2.25 |     2.29 |    2.29 |   -0.00%
- 31_startup-ci          |      1861.51 |  1978.65 | 2048.91 |   +3.55%
  32_startup-bt          |        77.15 |   103.05 |  101.91 |   -1.11%
+ 34_startup-totalbytes  |       197.35 |   344.05 |  296.51 |  -13.82%

Workflow: 1207166693
Adding new commits will generate a new report

@lukechu10 lukechu10 merged commit 9346692 into master Sep 6, 2021
@lukechu10 lukechu10 deleted the reactive-scope-weak branch September 6, 2021 20:49
@lukechu10 lukechu10 added the C-bug Category: bug, something isn't working label Sep 11, 2021
@lukechu10 lukechu10 changed the title ReactiveScope backlinks to parent ReactiveScope backlink to parent for finding contexts Sep 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug, something isn't working performance Performance related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant