I need to parse large text files that are broken up in sections ===begin msg===…===end msg=== and then do processing on those chunks of text in between.
what’s the best way to this? wouldn’t instr, mid, etc just be slow or inefficient on large files?
Not sure what your exact requirements are, but I would assume, that associating the file with a NotesStream, reading the content line by line and then possibly writing the content to another stream whenever a divider is encountered could be a fast way to do it.
Well, if ===begin msg=== and ===end msg=== are always on a line of their own. Just talking from the top of my head, this would probably need some tweaking, at least. Just looks to me, like it could be done that way.
If you simjply read in line by line and parse as you go, Instr and all won’t be particularly inefficient. Granted, the whole process may be slow, but that may or may not be an issue, depending on the speed you need.