bufferedreader: read a file line by line module (BufferedReader vs Scanner vs Files.lines vs readAllLines on a 1 GB file; heap at -Xmx64m, timings, read-call counts, one-huge-line OOM, charset/BOM/line-terminator pitfalls, Scanner swallowing IOException), 10 contract tests
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b3pDoGLiWk6LLBeHjW
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
generated big.log: 1,000,000,064 bytes in 9620 ms
|
||||
generated medium.log: 200,000,066 bytes in 2297 ms
|
||||
generated long.txt: 200,000,071 bytes in 237 ms
|
||||
$ ls -l (generated files)
|
||||
1000000064 big.log
|
||||
200000071 long.txt
|
||||
200000066 medium.log
|
||||
$ head -3 big.log
|
||||
2026-01-01T00:00:00.000Z INFO [worker-00] request id=000000000 path=/api/v1/items/0 status=500 ms=0
|
||||
2026-01-01T00:00:01.001Z INFO [worker-01] request id=000000001 path=/api/v1/items/1 status=200 ms=1
|
||||
2026-01-01T00:00:02.002Z INFO [worker-02] request id=000000002 path=/api/v1/items/2 status=200 ms=2
|
||||
$ wc -l big.log
|
||||
9623347
|
||||
Reference in New Issue
Block a user