Add Support for Item Deduplication in Batcher #87
restareaByWeezy
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
My team develops no-code community & commerce tool.
Biggest problem for developing no-code tool is client don't know what to fetch, only data knows.
As hundred of duplicated request are called but it is hard to deduplicate requests in component level.
So I highly suggest to add deduplicate feature for handle this problem.
Proposed Solution
Add optional deduplication support to
Batcherthrough new configuration options:Benefits
Performance: Reduces unnecessary processing of duplicate items
API Optimization: Fewer redundant network requests
Data Consistency: Ensures only unique items are processed
Flexible: Optional feature that doesn't affect existing behavior
Alternative Approaches
User-space deduplication: Users could manually deduplicate before calling addItem, but this:
Increases boilerplate code
Loses the temporal relationship between items
Harder to implement correctly with async scenarios
Set-based storage: Always use Set internally, but this:
Changes semantics for all users (breaking change)
Doesn't support object-based deduplication easily
No control over keep-first vs keep-last strategy
Questions
Looking forward to hearing thoughts on this feature!
I'm happy to work on a PR if this aligns with the project's goals.
Beta Was this translation helpful? Give feedback.
All reactions