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

Skip to content

Conversation

@SourceR85
Copy link
Contributor

@SourceR85 SourceR85 commented Apr 4, 2024

Improve readability and performance (slightly) of loops in pouchdb-find.

  • refactor iterator loops to for ... of: when i was only for element lookup.
  • flatten: use native Array.prototype.flat is 2x faster than polyfill.
  • uniq utility -> Array.from(Set): slight perf boost (Set is guaranteed to be unique).

Isolated from #8860

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.

Thanks!

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.

Thanks!

@SourceR85 SourceR85 merged commit 9ba277b into apache:master Apr 4, 2024
@SourceR85 SourceR85 deleted the PouchDB-find-loop-updates branch April 4, 2024 08:30
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.

2 participants