It sounds like you're drawing a sprite per pixel but I could be wrong. If you are, though, you should more likely use a vertex array of points.
With that said, converting from thousands of sprites to a vertex array will also help improve performance.
You could use
a ready and automatic batcher such as this one (easiest option), write a custom batcher or create the vertex array from the ground up (best but most complicated option).
If the issue is during preparation, you could likely perform the generation on values in memory (off the GPU) and only transfer to GPU when it's ready (such as by drawing a vertex array or other option).
"Other option": You could create an image or texture that contains what you are drawing and then draw just that as a quad (or multiple textures and quads if required). This is a pre-render.
A mid-way option is to do the same thing but to a render texture and that allows you to possibly more easily update it (or parts of it) if things change.