Task: Process 3 text files of about 1 GB in size and turn them into csv files. The source files have a custom structure, so regular expressions will be useful.
Problem: No problem. I use php for it, and that is fine. I do not need to process files faster. I'm just curious how you approach the problem as a whole. In the end, I would like to see simple and convenient solutions that could work faster than php.
@felix I'm sure of that. :) If I finished with the whole project, I will probably post this as a ping-pong cross-code code.
@mark My approach currently works this way, except that I cache a few hundred lines to keep writing files low. A well-designed memory trade is likely to last some time. But I'm sure other approaches can beat php a lot, like making full use of the * nix toolkit.
source share