commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary D. Gregory (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IO-278) Improve Tailer performance with buffered reads
Date Thu, 08 Mar 2012 18:43:59 GMT

    [ https://issues.apache.org/jira/browse/IO-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13225376#comment-13225376
] 

Gary D. Gregory commented on IO-278:
------------------------------------

Hello,

Can you create your patches on top of SVN trunk? I'll take a look this week.

Thank you,
Gary
                
> Improve Tailer performance with buffered reads
> ----------------------------------------------
>
>                 Key: IO-278
>                 URL: https://issues.apache.org/jira/browse/IO-278
>             Project: Commons IO
>          Issue Type: Improvement
>    Affects Versions: 2.0.1
>            Reporter: Sergio Bossa
>         Attachments: Tailer.diff, TailerTest.diff
>
>
> I noticed Tailer read performances are pretty poor when dealing with large, frequently
written, log files, and this is due to the use of RandomAccessFile which does unbuffered reads,
hence causing lots of disk I/O.
> So I improved the Tailer implementation by introducing buffered reads: it works by loading
large (configurable) file chunks in memory, and reading lines from there; this enhances performances
in my tests from 10x to 30x depending on the file size.
> I also added two test cases: one to simulate reading of a large file (you can use it
to compare performances), the other to verify correct handling on buffer breaks; obviously,
all tests pass.
> I'm attaching the diff files, let me know if it's okay for you guys!

--
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

        

Mime
View raw message