Skip to content

Remove batch size from SaveAll and DestroyAll #1047

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

Closed
wants to merge 2 commits into from
Closed

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented Dec 30, 2019

Closes: #1045

Adds slight improvement to saveAll([ParseFiles]). Should we return the parse files if only saving parse files?

Although batchSize is removed saveAll will still make multiple calls to the /batch endpoint to check for save cycles.

@codecov
Copy link

codecov bot commented Dec 30, 2019

Codecov Report

Merging #1047 into master will increase coverage by 0.02%.
The diff coverage is 76.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1047      +/-   ##
==========================================
+ Coverage   92.19%   92.22%   +0.02%     
==========================================
  Files          54       54              
  Lines        5152     5133      -19     
  Branches     1145     1139       -6     
==========================================
- Hits         4750     4734      -16     
+ Misses        402      399       -3
Impacted Files Coverage Δ
src/RESTController.js 84.21% <ø> (ø) ⬆️
src/ParseObject.js 89.56% <76.47%> (+0.11%) ⬆️

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 6dc6e5c...3826dc7. Read the comment docs.

@davimacedo
Copy link
Member

I understand that your idea is to completely remove the batch size option. Besides a batch of only 20 items by default looks small, we could at least keep the option for the developer to define a batch size, which can be useful and very convenient for saving a huge amount of objects. For example, I have recently used the JS SDK to load data to one of my apps and called Parse.Object.savelAll() to save more than 100K objects at once. It worked perfectly with the current batch size but I guess it would not work anymore if we completely remove the batch option. The reverse proxies use to have a max payload size and it would probably block my request. So, in my option, we should not remove the feature entirely.

@dplewis
Copy link
Member Author

dplewis commented Jan 5, 2020

I see, you have a valid point. Maybe we could do CoreManager.set('BATCH_SIZE', 20) to change the global default.

@davimacedo
Copy link
Member

Yes. I'd prefer something like this.

Copy link
Contributor

@acinader acinader left a comment

Choose a reason for hiding this comment

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

nice

@acinader
Copy link
Contributor

acinader commented Jan 7, 2020

ok, next time i'll read the convo first.

if i could dismiss my approval, i would.

@dplewis
Copy link
Member Author

dplewis commented Jan 7, 2020

@acinader No problem, I'll close this out and make the changes in a separate PR.

@dplewis dplewis closed this Jan 7, 2020
@dplewis dplewis deleted the remove-batchSize branch January 16, 2020 20:12
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.

[Discussion] Remove batchSize
3 participants