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

feat: improve serialization across multiple writes #1542

Merged
merged 2 commits into from Apr 9, 2020

Conversation

DylanPiercey
Copy link
Contributor

Description

This PR includes the following improvements:

  • typeName data (and indexes) are now cached across flushes and concatenated in the browser.
  • out.global/$global is now inlined with the rest of the component serialization instead of a separate global variable (<component-globals> is now deprecated).
  • Optimize script insertion point to avoid separate scripts with <await-reorderer> and <init-components>, there is now a single preferred injection point.
  • <init-components> and <await-reorderer> are no longer added to vdom compilations (they were already a noop).

It also prepares us to dedupe serialized component input across flushes which currently does not happen. (Will require a new serializer implementation instead of warp10).

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.

@DylanPiercey DylanPiercey force-pushed the serialize-multiple-writes-improvements branch 2 times, most recently from 7734430 to 2b09f86 Compare April 9, 2020 17:50
@codecov
Copy link

codecov bot commented Apr 9, 2020

Codecov Report

Merging #1542 into master will increase coverage by 0.01%.
The diff coverage is 96.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1542      +/-   ##
==========================================
+ Coverage   90.52%   90.53%   +0.01%     
==========================================
  Files         356      356              
  Lines       12731    12769      +38     
==========================================
+ Hits        11525    11561      +36     
- Misses       1206     1208       +2     
Impacted Files Coverage Δ
...e-tags/components/preferred-script-location-tag.js 92.85% <92.85%> (ø)
packages/marko/src/runtime/components/index.js 97.08% <95.91%> (-0.15%) ⬇️
.../src/runtime/components/init-components-browser.js 84.45% <97.29%> (+1.41%) ⬆️
...marko/src/core-tags/components/body-transformer.js 100.00% <100.00%> (ø)
...ko/src/core-tags/components/init-components-tag.js 96.29% <100.00%> (+2.35%) ⬆️
...rko/src/core-tags/core/await/reorderer-renderer.js 94.28% <100.00%> (+0.16%) ⬆️
...rko/src/core-tags/migrate/component-globals-tag.js 100.00% <100.00%> (ø)

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 7526081...1844a94. Read the comment docs.

@DylanPiercey DylanPiercey force-pushed the serialize-multiple-writes-improvements branch from 2b09f86 to eea5c24 Compare April 9, 2020 18:24
@DylanPiercey DylanPiercey merged commit 81c4da7 into master Apr 9, 2020
@DylanPiercey DylanPiercey deleted the serialize-multiple-writes-improvements branch April 10, 2020 19:54
DylanPiercey added a commit that referenced this pull request Apr 13, 2020
* feat: improve serialization across multiple writes

(cherry picked from commit 81c4da7)
DylanPiercey added a commit that referenced this pull request Apr 13, 2020
* feat: improve serialization across multiple writes

(cherry picked from commit 81c4da7)
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

2 participants