Comments (5)
Is there a practical use case where you combine ten thousand publishers?
Regardless, this uses Combine's underlying publisher so I imagine it is just too much memory for it to withstand. Nothing we can do here.
from combineext.
- There are use cases. For example I am downloading many small files, which I then store on disk.
- The number of publishers in the example is not necessarily representative of the problems that I am trying to solve, which have much more complex publishers and therefore much more quickly have stack overflow problems. The example with 10000 publishers is just that - a minimal example. When reducing the example to 350 publishers I still managed to produce a stack overflow on a background queue.
- The problem is that
Collection.combineLatest
callsPublisher.combineLatest
(note: this is not Combine'scombineLatest
- it is an overload defined by CombineExt), which recursively calls itself for every element of the collection of publishers. This is not a Combine issue and neither is it a problem with general memory usage.
from combineext.
Happy to accept a PR if you have any idea to optimize it for large collections.
from combineext.
I will see whether I can do so - but this will happen Monday the earliest.
This issue should IMO be left open unless properly resolved.
from combineext.
I would honestly prefer an open PR and not an open issue.
If an issue is a wide-spread bug, I agree, but if it only affects a very narrow use case, it's usually easy to discuss around a PR. Regardless, will reopen this for now and we can see what's the status next week. Thanks!
from combineext.
Related Issues (20)
- Swift 5.6 Release? HOT 5
- ‘Replace’ Operator HOT 3
- More efficient collect by time/scheduler?
- Ability to create a Passthrough and CurrentValue relay from an existing subject HOT 1
- Issues with the xcodeproj file HOT 1
- Unable to build 1.7.0 with Carthage HOT 1
- Memory Leak in ReplaySubject, WithLatestFrom, and anything else that uses the DemandBuffer HOT 1
- Is Relay necessary? HOT 1
- Documentation Building Failing on Xcode 14.0 HOT 7
- Issues with RetryWhen HOT 6
- .just, .empty and .fail on AnyPublisher HOT 1
- issues with CurrentValueRelay and PassthroughRelay subscription HOT 1
- Can 'Action' be supported?
- Is there Combine equivalent to RxSwiftExt apply operator ? HOT 3
- withLatestFrom doesn't seem to be thread safe
- CombineLatestMany behavior for 0 publishers HOT 2
- Generic parameter 'S' shadows generic parameter from outer scope with the same name; this is an error in Swift 6
- Memory leak issue with PassthroughRelay
- Apple privacy manifest support HOT 2
- How to use WithLatestFrom with @Published
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from combineext.