-
Notifications
You must be signed in to change notification settings - Fork 2
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
Use a dynamic number of threads instead of 4 for parsing #23
Comments
Well actually,
So I think we should offer the user the possibility to change this value but, if possible, we should let I see two use cases where the users might want to set the number of core themselves:
Additional point: whether we implement this or not, running several parallel calls to |
Instead of using 4 by default in `gn_parse_tidy()`
Oh... actually Now remains the question of using several cores when running parallel calls to |
I think the correct course of action here is to set the default number of threads for Reasons:
|
On the user side there are these two functions
rgnparser::gn_parse()
andrgnparser::gn_parse_tidy()
. Both call the non-exported functionrgnparser::parse_one()
that callsrgnparser::gnparser_cmd()
that callsgnparser
.Both exported functions have an argument
threads
with a default value of4
and it would make more sense to me if this number was higher.We could dynamically detect the number of available cores with
parallel::detectCores()
, I believe it is installed by default with R, and setthreads = number of cores - 1
.The text was updated successfully, but these errors were encountered: