davidmoten / davidmoten/rxjava-file
Issue with chunk size
- Dominant language
- Java
- Stars
- 85
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
I am working on a web based application to tail log file. I set a chunksize of 16384 and startPosition 5. My log file is around 38 MB in size and the browser hangs as soon as I do so. I am using Jetty and Primefaces.
When I click the server, the text area displaying log content gets filled up with way more data than expected.
```java
int displayChunkSize = 16384 :
long fileSize = path.toFile().length();
long startPos =5;
Observable tailer = FileObservable
.tailer()
.file( path.toFile().getAbsolutePath() )
.sampleTimeMs( 500 )
.chunkSize( displayChunkSize )
.startPosition( startPos)
.tailText();
SafeSubscriber safeSub = new SafeSubscriber(new ActionSubscriber(
onMessage, onError, Actions.empty() ) );
Runnable sub = () -> tailer.subscribe( safeSub );
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.