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

in_tail: Reduce startup time #1465

Closed
t-osakada opened this issue Feb 15, 2017 · 2 comments
Closed

in_tail: Reduce startup time #1465

t-osakada opened this issue Feb 15, 2017 · 2 comments
Labels
feature request *Deprecated Label* Use enhancement label in general

Comments

@t-osakada
Copy link
Contributor

t-osakada commented Feb 15, 2017

Currently, in_tail startup process take very long time when reading huge files.
Would you consider adding an option like skip_refresh_on_startup :bool to reduce startup time?

ex.

     def start
       super

       if @pos_file
         @pf_file = File.open(@pos_file, File::RDWR|File::CREAT|File::BINARY, @file_perm)
         @pf_file.sync = true
         @pf = PositionFile.parse(@pf_file)
       end

-      refresh_watchers
+      refresh_watchers unless @skip_refresh_on_startup
       timer_execute(:in_tail_refresh_watchers, @refresh_interval, &method(:refresh_watchers))
     end
@repeatedly
Copy link
Member

It seems no problem for me.

@repeatedly repeatedly added the feature request *Deprecated Label* Use enhancement label in general label Feb 16, 2017
@t-osakada
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request *Deprecated Label* Use enhancement label in general
Projects
None yet
Development

No branches or pull requests

2 participants