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

Should we remove no-await-in-loop rule ? #40

Open
tpoisseau opened this issue Oct 15, 2024 · 4 comments
Open

Should we remove no-await-in-loop rule ? #40

tpoisseau opened this issue Oct 15, 2024 · 4 comments

Comments

@tpoisseau
Copy link
Member

https://github.com/zakodium/profid/pull/1910#discussion_r1799472129

I agree ideally we should parallelize async statements but often we disable this rule many times in a for loop, or on the file, on purpose.
To reduce workload, to simplify error management / avoid racing conditions.

I don't have memories where the rules reminds me I should Promise.all / Promise.allSettled instead of await in sequence.

It's not the first time we talk about this rule in an issue, or in vocal.

So, what do we do ?

@zakodium/collaborators

@stropitek
Copy link
Contributor

I think we can disabled it by default, and enable it in specific parts of an application or files where we know we have to be extra mindful about this.

@Sebastien-Ahkrin
Copy link
Member

I agree with your proposal Daniel

@targos
Copy link
Member

targos commented Oct 15, 2024

I agree too.

@lpatiny
Copy link

lpatiny commented Oct 15, 2024

Thanks to this rule, we significantly improved the loading of files (fetch in parallel) in NMRium. Of course, we could optionally enable it, but I think it will be easier to optionally disable it for a full project.

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

5 participants