What's the best way to display a ton of strings (around 10,000 strings) without extreme lag?

Hello! I am working on a project that sandboxes a function/script (usually obfuscated ones) and logs pretty much every move it does. The issue with this is that executing massive scripts will result in a massive lag spike due to it printing more than 1,000 strings containing information about what that script is doing.


What is shown above is the usage of the print function to log the instructions of an obfuscated script. This massively lags, especially when printing a ton of instructions.

I also tried utilizing a remote code execution vulnerability within Studio to write the instructions into a .txt file, but this approach was even more laggy.

Do you all know any possible non laggy approach to this? Like, a way for me to display information about the instructions without massive lag? Thank you!

Instead of printing all 10,000 strings at once, break them into smaller batches (for example: 100 strings at a time), then you could combine them later.

I would like to see a example of that

a WHAT

…anyways…
Have you tried any compression algorithms? 10000 strings is quite a lot… maybe save them as one string and compress that.