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

Slow when async::run with multiple functions in db #50

Open
gabrielpuzl opened this issue Nov 1, 2024 · 0 comments
Open

Slow when async::run with multiple functions in db #50

gabrielpuzl opened this issue Nov 1, 2024 · 0 comments

Comments

@gabrielpuzl
Copy link

gabrielpuzl commented Nov 1, 2024

      foreach ($requests as $request) {
           Async::run($request);
       }
       [$req1, $req2, $req3, $req4, $req5, $req6] = Async::wait()

Why is using async making my code slower? I'm only running 3 tasks concurrently, but it's taking longer than when I run them synchronously. Am I missing a configuration setting?

Note: These functions are intended to fetch data from multiple tables in the database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant