Cut corners when you're writing an interpreter (for good reasons, usually) and you'll understand why smile but the basics are, if you join lots of data together rather than parsing it on the fly you might end up with inefficient code that spends most of it's time concatenating very long strings. Try processing (echoing) smaller parts (lines as suggested) at a time.