Script editor lag with large amounts of text

Im working on a project that requires importing a image, its a heightmap that will be used to generate smooth terrain, since roblox cant read image pixels, I’ve created a external program to convert the image into readable text.
The text is 4mb, its just a table with the rgbs.

I can paste the text into notepad with no problem, but as soon as i paste it into a roblox studio script the entire studio freezes.

I’ve tried it with a significantly smaller piece of text, but still bigger than the average script, and it can paste in after a few minutes of loading, but every time that script loads studio freezes up for about 30 seconds, and the same happens when trying to edit the text at all.

Surely this doesn’t need to happen as no text editors have this problem.

3 Likes

Yeah, it definitely slows down when you paste megabytes of text on a single line.

1 Like

Wow, I’ve just tested some more, and if i put new lines frequently throughout the file before pasting it in, studio has little problem pasting it in, so yes it definitely seems to be caused by long single lines, not large amount of text in total.