Skip to content

Improve serialization performance - #2165

Merged
feast-ci-bot merged 1 commit into
feast-dev:masterfrom
judahrand:perf-serialize
Dec 21, 2021
Merged

feast-ci-bot merged 1 commit into
feast-dev:masterfrom
judahrand:perf-serialize

Conversation

@judahrand

@judahrand judahrand commented Dec 21, 2021 •

Copy link
Copy Markdown
Member

Signed-off-by: Judah Rand 17158624+judahrand@users.noreply.github.com

What this PR does / why we need it:
Similar quick pass as the deserialize PR (#2164). A definite improvement but not as drastic as the other one. Looks like between 20-30% improvement. This is achieved by avoiding memory copies as much as possible by using Numpy and allowing Protobuf to handle that more sensibly than copying to convert to Python object then copying back again to create Protobuf Message.

Same benchmark as the deserialize PR:

On master:
image

With changes:
image

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

None

@codecov-commenter

codecov-commenter commented Dec 21, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #2165 (9382202) into master (f279a7d) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2165      +/-   ##
==========================================
- Coverage   84.57%   84.56%   -0.01%     
==========================================
  Files         102      102              
  Lines        8173     8175       +2     
==========================================
+ Hits         6912     6913       +1     
- Misses       1261     1262       +1     
Flag Coverage Δ
integrationtests 74.30% <100.00%> (-0.30%) ⬇️
unittests 58.71% <66.66%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
sdk/python/feast/type_map.py 73.17% <ø> (+0.81%) ⬆️
sdk/python/feast/infra/provider.py 89.90% <100.00%> (-0.75%) ⬇️
.../integration/online_store/test_universal_online.py 97.67% <0.00%> (-0.47%) ⬇️

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 f279a7d...9382202. Read the comment docs.

Signed-off-by: Judah Rand <17158624+judahrand@users.noreply.github.com>

@achals achals 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.

/lgtm

@feast-ci-bot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: achals, judahrand

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@feast-ci-bot
feast-ci-bot merged commit b8daefa into feast-dev:master Dec 21, 2021
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.

5 participants