Skip to content

Minor performance optimization during serialization into JSON format#1066

Merged
0xnm merged 1 commit into
developfrom
nogorodnikov/perf_optimization_during_serialization
Oct 3, 2022
Merged

Minor performance optimization during serialization into JSON format#1066
0xnm merged 1 commit into
developfrom
nogorodnikov/perf_optimization_during_serialization

Conversation

@0xnm

@0xnm 0xnm commented Sep 30, 2022

Copy link
Copy Markdown
Member

What does this PR do?

I noticed a small issue in the related code: since JsonArray actually implements Iterable, is JsonArray branch will never be executed, because it goes after is Iterable branch.

By moving is JsonArray up we skip useless toJsonArray call which will create new object and copy elements there from the old object.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@0xnm
0xnm requested a review from a team as a code owner September 30, 2022 14:12
@codecov-commenter

codecov-commenter commented Sep 30, 2022

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.26%. Comparing base (36fb6d6) to head (9b7d7a7).
⚠️ Report is 3530 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1066      +/-   ##
===========================================
+ Coverage    83.24%   83.26%   +0.02%     
===========================================
  Files          272      272              
  Lines         9279     9279              
  Branches      1494     1494              
===========================================
+ Hits          7724     7726       +2     
+ Misses        1140     1138       -2     
  Partials       415      415              

see 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mariusc83 mariusc83 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch !!

@0xnm
0xnm merged commit a432210 into develop Oct 3, 2022
@0xnm
0xnm deleted the nogorodnikov/perf_optimization_during_serialization branch October 3, 2022 07:52
@xgouchet xgouchet added this to the 1.15.0 milestone Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants