Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Actor/Threads #43

Open
iamthekk opened this issue Feb 2, 2024 · 3 comments
Open

Support Actor/Threads #43

iamthekk opened this issue Feb 2, 2024 · 3 comments
Labels
external This is caused by an external project feature New feature or request

Comments

@iamthekk
Copy link

iamthekk commented Feb 2, 2024

As projects grow in complexity and size, the ability to perform operations concurrently becomes increasingly critical. Implementing multithreading support could offer substantial benefits.

@iamthekk iamthekk added the feature New feature or request label Feb 2, 2024
@Ukendio
Copy link
Member

Ukendio commented Feb 2, 2024

Maybe in the future when we have pipelines this is more plausible. The main problem is knowing what data is being written to and when. And for that we need systems to be aware of each other - which they aren't right now.

i kind of feel like you would need a prepared query that declares what components are being used or else I am not really sure how we would even begin to partition which components to a specific actor VM.

However with pipelines we can implement sync points between systems and also possibly discern what- and where data is changed. And for this we want a declarative API that helps coordinate this.

But beyond the technical hurdles, actor synchronization itself is really expensive that I am not sure if inter-system parallelism is worth it. AFAIK no benchmarks out there has actually shown that parallelizing ECS in Luau has any performance benefits. There are however examples of the opposite.

@LastTalon
Copy link
Member

But beyond the technical hurdles, actor synchronization itself is really expensive that I am not sure if inter-system parallelism is worth it. AFAIK no benchmarks out there has actually shown that parallelizing ECS in Luau has any performance benefits. There are however examples of the opposite.

This is the key issue in my opinion. The cost of synchronization through actors (which we currently would have to do) outweighs the benefits of parallelization in any benchmarks, tests, or prototypes I've seen.

We can easily support concurrency through pipelines if there's a valid use-case for that, but at the moment I can only conceive of a negative (losing system order determinism). If you have a use-case for system concurrency that doesn't rely on parallelism (single-threaded concurrency) for which this downside might be worth dealing with, let us know.

@LastTalon LastTalon added the external This is caused by an external project label Feb 2, 2024
@LastTalon
Copy link
Member

Marking this as externally blocked on the Roblox actor model for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external This is caused by an external project feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants