If you can do this one at a time, then the answer is simple:
- Read the line.
- Process line.
- Write down the line.
If you want this to accelerate, place those of the three BlockingCollectionswith the indicated upper limit of about 10, so a slower step will never wait for a faster step. If you can output to another physical disk (if output to disk).
The OP changed the rules even after they were asked if the process was line by line (twice).
- Read the lines to create a unit of work (open to close tags).
- Production unit of work.
- Write a unit of work.
source
share