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

Optimize level and events #210

Merged
merged 6 commits into from
Jul 7, 2018
Merged

Optimize level and events #210

merged 6 commits into from
Jul 7, 2018

Conversation

olistic
Copy link
Owner

@olistic olistic commented Jul 6, 2018

Optimize shapes of level and play events, reducing the size of the payloads.

Version Level payload size Events payload size
v0.6.0 2K 41K
v0.7.0 2K 15K
This PR 1.1K 5K

Tests performed by JSON-stringifying the payloads when playing level 1 of beginner's tower.

This signifies a ~45% and ~88% reduction on the level payload size and the events payload size, respectively, based on version v0.6.0.

@codecov-io
Copy link

codecov-io commented Jul 6, 2018

Codecov Report

Merging #210 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #210      +/-   ##
==========================================
+ Coverage   92.22%   92.23%   +<.01%     
==========================================
  Files          86       86              
  Lines        1068     1069       +1     
  Branches      176      173       -3     
==========================================
+ Hits          985      986       +1     
  Misses         68       68              
  Partials       15       15
Impacted Files Coverage Δ
packages/warriorjs-core/src/Logger.js 100% <ø> (ø) ⬆️
packages/warriorjs-core/src/Floor.js 100% <ø> (ø) ⬆️
packages/warriorjs-cli/src/utils/getLevelConfig.js 100% <ø> (ø) ⬆️
packages/warriorjs-core/src/Unit.js 100% <ø> (ø) ⬆️
packages/warriorjs-core/src/Space.js 100% <ø> (ø) ⬆️
packages/warriorjs-core/src/runLevel.js 100% <ø> (ø) ⬆️
packages/warriorjs-core/src/Warrior.js 100% <100%> (ø) ⬆️
...ackages/warriorjs-cli/src/ui/printWarriorStatus.js 100% <100%> (ø) ⬆️
packages/warriorjs-cli/src/ui/getUnitStyle.js 100% <100%> (ø) ⬆️
packages/warriorjs-core/src/loadLevel.js 89.28% <100%> (ø) ⬆️
... and 7 more

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 1cde47a...e27a5e3. Read the comment docs.

@olistic olistic force-pushed the optimize-level-events branch 3 times, most recently from 84e8777 to fa1244f Compare July 6, 2018 23:55
@olistic olistic merged commit cbccb2d into master Jul 7, 2018
@olistic olistic deleted the optimize-level-events branch July 7, 2018 00:06
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