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

Call indexing performance improvement #180

Merged
merged 2 commits into from Nov 13, 2012

Conversation

Projects
None yet
1 participant
@presidentbeef
Copy link
Owner

commented Nov 13, 2012

When generating the CallIndex, call targets are converted to strings. This is to allow matching of known call targets against regexes. However, Brakeman was converting all call targets (including huge Sexps) to strings. This was taking up time and memory (I saw a big garbage collector improvement with this change) and it was pointless.

Should help with issue #171

One app I tested this on, which was taking a long time to index call sites, went from ~3.5 minutes to ~2 minutes.

presidentbeef added some commits Nov 13, 2012

Only convert call target to string if symbol
The only thing this is used for is matching regexes
against known call targets. We only want to store these
strings if the call target is a symbol, not a full Sexp.
Big performance improvement for large apps.

presidentbeef added a commit that referenced this pull request Nov 13, 2012

Merge pull request #180 from presidentbeef/call_index_fixes
Call indexing performance improvement

@presidentbeef presidentbeef merged commit ac5e418 into master Nov 13, 2012

1 check passed

default The Travis build passed
Details

Repository owner locked and limited conversation to collaborators Feb 16, 2016

@presidentbeef presidentbeef deleted the call_index_fixes branch Jul 22, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.