-
Notifications
You must be signed in to change notification settings - Fork 186
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 sg lightweight instead of igraph #151
Comments
Sounds good to me, I had initially used igraph as a performance improvement, but it is a heavy dependency for sure. |
Do you have an idea how big the graphs are? |
Depends on the file you are linting I guess, I was testing on https://github.com/wch/r-source/blob/trunk/src/library/tools/R/QC.R which is ~8300 lines long. Lintr splits the parse data data frames by expression, looks like the largest dataframe is 6652 rows, which I guess is fairly small... |
Indeed, my quick and dirty R implementation will not do. For QC.R it increases running time from 70 sec to 223 sec. https://github.com/gaborcsardi/lintr/commit/7121cf8d86b547539f7ebc773910bd05667eccac I'll try sg else in a minute. Btw. is this graph component stuff only needed for splitting the file into expressions? Because then maybe I can ~~~start~~~ try sg else. Btw. 2. it is easy to write this in C as well, is that preferable to igraph? I am not sure myself. Maybe the best would be some micro-package dependency that only does this, but fast (= using C code). |
OK, the bottleneck was a stupid type conversion (did you know that |
If you are interested, I will provide a PR soonish. Either for switching to https://github.com/mangothecat/simplegraph which is R-only and has no dependencies, or custom code. It is fairly trivial.
The text was updated successfully, but these errors were encountered: