Skip to content
This repository has been archived by the owner on Jul 16, 2022. It is now read-only.

Benchmark and Explore Optimization Opportunities for Graph Implementation #104

Closed
adamgfraser opened this issue Nov 10, 2020 · 3 comments
Closed
Labels
good first issue Good for newcomers

Comments

@adamgfraser
Copy link
Contributor

ZIO ZMX needs to keep track of the graph of fibers within a ZIO program, that is which fibers are descendants of which other fibers. Currently ZIO ZMX uses the Graph data type in zio.xmx.graph to do this, which represents an immutable graph.

The first part of this ticket is to add benchmarks for the performance of ZIO ZMX when generating fiber dumps for ZIO programs that construct extremely large fiber graphs (e..g 100,000 fibers) with different structures (very "deep" trees where one fiber forks another fiber that forks another fiber many times, very "broad" trees where one fiber forks many fibers, mixtures of these two).

After that the next step would be to explore whether there is a more efficient representation that could be used. The current representation is something like AtomicReference[Map[Fiber, Set[Fiber]]]. Alternatively, it could be something like ConcurrentMap[Fiber, Set[Fiber]]. We need the benchmarks to see if that is really an improvement.

@adamgfraser
Copy link
Contributor Author

Another possible implementation would be something like an actor where all updates are offered to a queue and then there is a single worker that takes values from the queue as they become available. That would allow the underlying implementation to be mutable and not thread safe.

@KadekM
Copy link
Contributor

KadekM commented Nov 21, 2020

I'll create the benchmark

@softinio softinio added good first issue Good for newcomers and removed #ziohackathon labels Dec 28, 2020
@adamgfraser
Copy link
Contributor Author

The graph implementation no longer exists.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants