IDSgrep performance tweaks from profiling