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

blocked when "-e ." with a big file #101

Open
Pingze-github opened this issue Oct 10, 2018 · 1 comment
Open

blocked when "-e ." with a big file #101

Pingze-github opened this issue Oct 10, 2018 · 1 comment

Comments

@Pingze-github
Copy link

When I run "sift -e . /***/log.log -n --follow --binary-skip --limit=10", the program blocked with nothing to print.

But when I change "." to ".*", It works normally(in 30ms).

The file has about 8,000 lines.

In my opinion, "." has nothing different with ".*", why it makes the program blocked?

(version: sift 0.9.0 (windows/amd64))

@svent
Copy link
Owner

svent commented Oct 10, 2018

Thank you for your report.
sift does not really block - the search just runs insanely slow, as every character in the file generates a match and those matches are later merged into one match per line.
Searching for '.' is quite unusual and there is a good workaround ('.+' would be better here, as '.*' also matches empty lines), but I have to admit that this behavior is bad and should be improved.

I will leave this issue open to track this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants