The option i selected to write line by line was using direct writing to the paralell port, and using ESC codes, the result was quite good. Of course, a small delay was completely necesary to avoid the CPU to be totally loaded, perhaps your problem is something similar, and you could try placing a delay after write operation.
Hope this helps