Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@alxndrsn
Copy link
Contributor

Remove one layer of functions.

Copy link
Contributor

@garethbowen garethbowen left a comment

Choose a reason for hiding this comment

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

Is this function used a lot? Does this yield a measurable improvement?

@alxndrsn
Copy link
Contributor Author

Is this function used a lot? Does this yield a measurable improvement?

I suspect not - it's specific to bulkDocs(..., { ..., new_edits: true, ...})

@SourceR85
Copy link
Contributor

SourceR85 commented Oct 12, 2023

Is this function used a lot? Does this yield a measurable improvement?

I suspect not - it's specific to bulkDocs(..., { ..., new_edits: true, ...})

bulkDocs get called by every api-call to PouchDB.post... true is the default value for new_edits in this case.
I think the relative performance impact depends on the use case.

Edit: PouchDB.put omits the use of bulkDocs, if new_edits is set to true or a specialized _put function is available (adapter http).

Copy link
Contributor

@garethbowen garethbowen left a comment

Choose a reason for hiding this comment

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

I'm a little on the fence here... I think it's a little less readable, but should be a little faster. But I'm not one to stand in the way of progress, so approved!

@alxndrsn alxndrsn merged commit 9f01e63 into apache:master Oct 14, 2023
@alxndrsn alxndrsn deleted the newedits-false-revs-over-10 branch October 14, 2023 15:32
alxndrsn added a commit to alxndrsn/pouchdb that referenced this pull request Nov 6, 2023
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.

3 participants