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

perf: optimize serializing renderBody & legacy widgets #1539

Merged
merged 1 commit into from Apr 6, 2020

Conversation

DylanPiercey
Copy link
Contributor

Description

Optimizes serialization by doing the following:

  • Legacy component marker is now a flag instead of a prop.
  • input.renderBody now serializes as a flag instead of warp10Noop.
  • extra serialized data is omitted if empty
  • extra.r (renderBoundary) is removed since it is not in use.

This PR also contains a fix where is is possible to have a false negative when checking if the input changed across renders if removing an undefined property.

Checklist:

  • I have read the CONTRIBUTING document and have signed (or will sign) the CLA.
  • I have updated/added documentation affected by my changes.
  • I have added tests to cover my changes.

@codecov
Copy link

codecov bot commented Apr 6, 2020

Codecov Report

Merging #1539 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1539      +/-   ##
==========================================
+ Coverage   90.57%   90.59%   +0.01%     
==========================================
  Files         356      356              
  Lines       12685    12705      +20     
==========================================
+ Hits        11490    11510      +20     
  Misses       1195     1195              
Impacted Files Coverage Δ
...ges/marko/src/runtime/components/beginComponent.js 100.00% <ø> (ø)
.../src/runtime/components/init-components-browser.js 83.04% <ø> (ø)
packages/marko/src/runtime/components/util.js 91.30% <ø> (ø)
packages/marko/src/runtime/helpers/dynamic-tag.js 97.43% <ø> (ø)
...kages/marko/src/runtime/html/helpers/data-marko.js 100.00% <ø> (ø)
packages/marko/src/runtime/components/Component.js 95.86% <100.00%> (ø)
...kages/marko/src/runtime/components/ComponentDef.js 98.73% <100.00%> (+0.12%) ⬆️
packages/marko/src/runtime/components/index.js 97.22% <100.00%> (+0.41%) ⬆️
...runtime/components/legacy/defineRenderer-legacy.js 93.75% <100.00%> (ø)
...o/src/runtime/components/legacy/renderer-legacy.js 96.96% <100.00%> (-0.04%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c958f49...ff11c3f. Read the comment docs.

@DylanPiercey DylanPiercey merged commit 5a74012 into master Apr 6, 2020
@DylanPiercey DylanPiercey deleted the legacy-serialize-optimize branch April 10, 2020 19:54
DylanPiercey added a commit that referenced this pull request Apr 13, 2020
DylanPiercey added a commit that referenced this pull request Apr 13, 2020
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.

None yet

1 participant