Printing big table with 'show tables expanded by default’ disabled still creates massive lag

Description
I was trying to figure out why it took so long to spawn a character into a world and it turned out that because I was printing the world table it took several seconds (10+) until the next line of code were executed.

Some of the functions in my game return tables that contain a whole world, aka. multiple sub-tables with alot of properties like position, parts etc.
Basically some functions return huge tables, not for printing but for reference in other scripts. If you print these tables a huge lag occures every time. Even if you dont expand the table!

Where
This happens in studio, I’m not sure if it occures online.

When
Noticed this behaviour yesterday but I believe it’s been a thing ever since the Output window remake came out.

Repro file: LagRepro.rbxl (21.8 KB)

Simply press play and notice the lag that occures inbetween the table being printed and the

print(“End”)

line being executed.

1 Like

Hello. We’ve looked into what’s causing the issue. Can you please toggle “Log Mode” in the Output window to disable expanded table printing? This can be toggled on/off live so it can be turned back on when needed. This seems to work on my side. Printing such a huge table isn’t all that unexpected to cause a freeze with Log Mode off. Does this work for you?

OutputLogMode

3 Likes

Enabling Log mode seems to have solved the issue.
Thanks!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.