Giter Site home page Giter Site logo

Comments (5)

freak4pc avatar freak4pc commented on August 20, 2024 1

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.

palle-k avatar palle-k commented on August 20, 2024
  1. There are use cases. For example I am downloading many small files, which I then store on disk.
  2. 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.
  3. The problem is that Collection.combineLatest calls Publisher.combineLatest (note: this is not Combine's combineLatest - 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.

freak4pc avatar freak4pc commented on August 20, 2024

Happy to accept a PR if you have any idea to optimize it for large collections.

from combineext.

palle-k avatar palle-k commented on August 20, 2024

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.

freak4pc avatar freak4pc commented on August 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.