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

Optimise #save #623

Merged
merged 2 commits into from Feb 7, 2023
Merged

Optimise #save #623

merged 2 commits into from Feb 7, 2023

Conversation

andrykonchin
Copy link
Member

@andrykonchin andrykonchin commented Jan 7, 2023

Improve saving:

  • send only changed attributes when save persisted model
  • don't send any request when there are no changed attributes

@codecov
Copy link

codecov bot commented Jan 7, 2023

Codecov Report

Merging #623 (d2d67fc) into master (103a4c7) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

❗ Current head d2d67fc differs from pull request most recent head e93054b. Consider uploading reports for the commit e93054b to get more accurate results

@@            Coverage Diff             @@
##           master     #623      +/-   ##
==========================================
- Coverage   90.22%   90.18%   -0.05%     
==========================================
  Files          61       60       -1     
  Lines        3100     3076      -24     
==========================================
- Hits         2797     2774      -23     
+ Misses        303      302       -1     
Impacted Files Coverage Δ
lib/dynamoid/components.rb 100.00% <ø> (ø)
...dynamoid/adapter_plugin/aws_sdk_v3/item_updater.rb 100.00% <100.00%> (ø)
lib/dynamoid/dirty.rb 96.42% <100.00%> (+0.04%) ⬆️
lib/dynamoid/fields.rb 100.00% <100.00%> (ø)
lib/dynamoid/persistence.rb 98.06% <100.00%> (-0.02%) ⬇️
lib/dynamoid/persistence/import.rb 100.00% <100.00%> (ø)
lib/dynamoid/persistence/save.rb 96.36% <100.00%> (-3.64%) ⬇️
lib/dynamoid/document.rb 95.12% <0.00%> (-0.44%) ⬇️
lib/dynamoid/adapter_plugin/aws_sdk_v3.rb 94.30% <0.00%> (-0.18%) ⬇️
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions
Copy link

github-actions bot commented Feb 4, 2023

Code Coverage

Package Line Rate Health
dynamoid 90%
Summary 90% (2812 / 3117)

Minimum allowed line rate is 90%

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