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

Sample canvas renderer #195

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Sample canvas renderer #195

wants to merge 6 commits into from

Conversation

lifeart
Copy link
Owner

@lifeart lifeart commented Jan 18, 2025

Todos:

  • cleanup codebase
  • mark component output as already rendered (using weak map?) - to do proper list "relocation"
  • add test for multiple roots inside list item (list relocation tests)
  • in general, we should always have unstable component wrapper for lists if we have > 1 root nodes, or this node is not an component
  • add test for list where list item is a component with it's own dom, + nested components (outside main component DOM)
  • remove $nodes property, and use $_fin to declare RENDERED_NODES_PROPERTY symbol on instance.
  • inside renderElement function replace RENDERABLE node to actual node (by index) inside RENDERED_NODES_PROPERTY array

Copy link

netlify bot commented Jan 18, 2025

Deploy Preview for g-next ready!

Name Link
🔨 Latest commit 1f035be
🔍 Latest deploy log https://app.netlify.com/sites/g-next/deploys/679940d996fe6800085bec2f
😎 Deploy Preview https://deploy-preview-195--g-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

github-actions bot commented Jan 18, 2025

Code Coverage Report

Coverage after merging sample-canvas-renderer into master

78.73%
Coverage Report
FileLines (%)Funcs (%)Uncovered Lines
.../pages/page-two
   Clock.ts94.4483.3318, 27
tests
   utils.ts98.5294.74117, 118, 119
utils
   component.ts97.2763, 64, 80, 86, ...
   context.ts43, 49, 62, 87, ...
   dom-api.ts97.2238, 52, 53, 54, ...
   dom.ts97.3986.54990, 991, 992, 995, ...
   math-api.ts97.6230, 31
   reactive.ts93.0697.2249, 63, 68, 69, ...
   runtime.ts93.5518, 21, 22, 23, ...
   shared.ts60, 66, 68, 92, ...
   svg-api.ts84.9135, 36, 37, 38, ...
   vm.ts24, 28, 34, 4, ...
utils/benchmark
   benchmark.ts67.4424, 25, 26, 27, ...
   compat.ts96.2328, 29, 30, 38, ...
utils/control-flow
   if.ts74.3676.9295, 96, 97, 98, ...
   list.ts95.8990.91420, 421, 98, 99, ...
utils/glimmer
   destroyable.ts12, 26, 36, 50, ...
utils/helpers
   and.ts77.784, 5, 6
   eq.ts3, 4
   hash.ts81.8266.6714, 15, 16, 17, ...
   if.ts71.433, 4, 5
   or.ts4
utils/inspector
   ember-inspector.ts12.45096, 97, 98, 99, ...
   index.ts33.33096, 97, 98, 99, ...
utils/renderers
   canvas.ts80.0887.5027, 28, 29, 30, ...
utils/ssr
   rehydration-dom-api.ts52.6388, 95, 96, 97, ...
   rehydration.ts153, 39, 42, 79, ...

Copy link

github-actions bot commented Jan 18, 2025

duration phase estimated regression +157ms [113ms to 203ms] OR +1.32% [0.95% to 1.72%]
renderEnd phase no difference [-2ms to 1ms]
render1000Items1End phase no difference [-5ms to 3ms]
clearItems1End phase no difference [-2ms to 1ms]
render1000Items2End phase estimated regression +1ms [0ms to 15ms] OR +0.14% [0.01% to 2.38%]
clearItems2End phase no difference [0ms to 0ms]
render5000Items1End phase no difference [-2ms to 21ms]
clearManyItems1End phase no difference [-3ms to 2ms]
render5000Items2End phase estimated regression +36ms [25ms to 47ms] OR +1.28% [0.89% to 1.64%]
clearManyItems2End phase estimated improvement -9ms [-16ms to -4ms] OR -3.13% [-5.49% to -1.5%]
render1000Items3End phase no difference [-3ms to 4ms]
append1000Items1End phase estimated regression +28ms [14ms to 66ms] OR +4.21% [2.06% to 9.79%]
append1000Items2End phase no difference [-4ms to 15ms]
updateEvery10thItem1End phase no difference [-2ms to 8ms]
updateEvery10thItem2End phase no difference [-7ms to 3ms]
selectFirstRow1End phase no difference [0ms to 1ms]
selectSecondRow1End phase estimated regression +1ms [0ms to 1ms] OR +0.49% [0.24% to 1.19%]
removeFirstRow1End phase no difference [0ms to 5ms]
removeSecondRow1End phase no difference [0ms to 1ms]
swapRows1End phase estimated regression +59ms [51ms to 66ms] OR +44.49% [37.95% to 49.39%]
swapRows2End phase no difference [0ms to 1ms]
clearItems4End phase no difference [0ms to 3ms]
paint phase no difference [0ms to 0ms]

[21:24:12] Generating Benchmark Reports [started]
[21:24:21] Generating Benchmark Reports [completed]

Benchmark Reports    

JSON: /home/runner/work/glimmer-next/glimmer-next/tracerbench-results/compare.json

PDF: /home/runner/work/glimmer-next/glimmer-next/tracerbench-results/artifact-1.pdf

HTML: /home/runner/work/glimmer-next/glimmer-next/tracerbench-results/artifact-1.html

@lifeart lifeart force-pushed the sample-canvas-renderer branch 2 times, most recently from f3d7643 to a2a1ae1 Compare January 18, 2025 22:53
@lifeart lifeart mentioned this pull request Jan 19, 2025
+

+

get rid of nodes

+

streamline rendering pipeline
@lifeart lifeart force-pushed the sample-canvas-renderer branch from f6f6d84 to 32423f0 Compare January 24, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant