Timeline for Large file log parser with less memory footprint
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 23, 2023 at 20:02 | comment | added | ruds |
Note that std::istream::tellg allows you to determine the current input position.
|
|
Apr 23, 2023 at 21:01 | comment | added | G. Sliepen |
I'm refering to std::istream::getline() , which allows you to specify the maximum size to read in. As for the race condition, it doesn't matter how you wait, but you cannot seek to the end and assume you did not skip anything. If you need to seek at all, seek to the number of characters read so far.
|
|
Apr 23, 2023 at 12:58 | comment | added | Rohith Uppala |
Thanks for the suggestions. I checked the getline() documentation and it seems like it reads the whole line into memory or the delimiter we introduce. I am not sure how can we use that to replace get() which I am using right now And regarding race condition, seems like the best way is to run a file watcher and trigger a callback once the update event is triggered. Do you recommend any other better way? I am gonna replace global variables and also make keyword search using regex
|
|
Apr 22, 2023 at 23:01 | history | answered | G. Sliepen | CC BY-SA 4.0 |