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
Layout/SpaceAroundMethodCallOperator is slow #8021
Comments
Note: one could use |
@marcandre Can you help me out with how you did profiling on this? I can give it a shot then. |
I need to create a rake task to do this properly, but I want to finish #7868 beforehand. In the meantime there's a rake task for testing a particular cop you could use. If you manage not to use tokens at all it would be a big improvement. Or wait a few days and there will be a rake task to measure the cops... |
Also ran into the same issue, enabling this cop pushed rubocop runs (cache disabled) from ~1 or 2 minutes to over 20 minutes on my codebase. It took a bit or work to figure out the culprit (doing bisection with |
This cop inspects in
O(n^2)
instead ofO(n)
as it should (culprit is this loop) (wheren
is the order of send nodes / tokens)As an example, about 10% of
rake internal_investigation
is currently spent in this cop alone. This would be way worse if the source files were not kept kind of small.@saurabhmaurya15 would you like to look at this? Using tokens may have been a nice generic way of handling things but we can't afford it. We must use
node.loc
.The text was updated successfully, but these errors were encountered: