[jira] [Created] (IO-332) Improve tailer's reading performance

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (IO-332) Improve tailer's reading performance

ASF GitHub Bot (Jira)
Liyin Liang created IO-332:
------------------------------

             Summary: Improve tailer's reading performance
                 Key: IO-332
                 URL: https://issues.apache.org/jira/browse/IO-332
             Project: Commons IO
          Issue Type: Improvement
            Reporter: Liyin Liang


Now, Tailer triggers a lot of calls to the underlying runtime system, that is, RandomAccessFile.read(), a native method that returns the next byte of the file. This approach is too slow to meet our need. The performance can be improved by using a large buffer, that is using RandomAccessFile.read(byte[]). Then Tailer only rarely accesses the underlying system.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (IO-332) Improve tailer's reading performance

ASF GitHub Bot (Jira)

     [ https://issues.apache.org/jira/browse/IO-332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Liyin Liang updated IO-332:
---------------------------

    Attachment: IO-332-1.diff

Attach a diff file. This diff re-writes the Tailer.readLines() method. With this diff, the reading performance can improve 100X.
               

> Improve tailer's reading performance
> ------------------------------------
>
>                 Key: IO-332
>                 URL: https://issues.apache.org/jira/browse/IO-332
>             Project: Commons IO
>          Issue Type: Improvement
>            Reporter: Liyin Liang
>         Attachments: IO-332-1.diff
>
>
> Now, Tailer triggers a lot of calls to the underlying runtime system, that is, RandomAccessFile.read(), a native method that returns the next byte of the file. This approach is too slow to meet our need. The performance can be improved by using a large buffer, that is using RandomAccessFile.read(byte[]). Then Tailer only rarely accesses the underlying system.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Resolved] (IO-332) Improve tailer's reading performance

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

     [ https://issues.apache.org/jira/browse/IO-332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary D. Gregory resolved IO-332.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.4

Patch applied with tweaks. Thank you!
               

> Improve tailer's reading performance
> ------------------------------------
>
>                 Key: IO-332
>                 URL: https://issues.apache.org/jira/browse/IO-332
>             Project: Commons IO
>          Issue Type: Improvement
>            Reporter: Liyin Liang
>             Fix For: 2.4
>
>         Attachments: IO-332-1.diff
>
>
> Now, Tailer triggers a lot of calls to the underlying runtime system, that is, RandomAccessFile.read(), a native method that returns the next byte of the file. This approach is too slow to meet our need. The performance can be improved by using a large buffer, that is using RandomAccessFile.read(byte[]). Then Tailer only rarely accesses the underlying system.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira