Games with very large scripts do not load

Reproduction Steps

Simply joining this test place that has a very large script (3 MB of bytecode) seems to freeze the client in the majority of cases. It should be noted that the game loads and plays perfectly fine within Roblox Studio, and it’s only the client that can’t load it.

The script being loaded is a slight variation of this:
https://gist.githubusercontent.com/Rerumu/ecaf1de2f2b31d0fa91b9bac8e1e15d8/raw/8d124e32201c5fcec04f9ea7d5e22f7cf583ecbf/luau_in_luau.lua

EDIT: The game no longer contains the code in question, but the issue can be reproduced anywhere by just adding it as a LocalScript under StarterPlayerScripts.

Specs if relevant:
OS: Windows 10
CPU: Ryzen 5 5600X
GPU: Radeon RX 6600XT
RAM: 16 GB

Expected Behavior

1. Start the game.
2. The game starts fine.
3. Profit.

Actual Behavior

1. Start the game.
2. Be stuck loading forever.
3. Eventually crash due to the watchdog.
4. Not profit.

Workaround

Not including scripts that are relatively large.

Issue Area: Engine
Issue Type: Freezing
Impact: Moderate
Frequency: Constantly

5 Likes

Not very educated in this topic, but may be the result of a memory leak somewhere(?)

Try looking over your scripts or using the debug tool to see if theres any scripts doing a lil too much trolling

Thanks. The issue is being investigated.

1 Like

Hello.
Sorry for not responding earlier, I did look for the issues when this was originally reported and couldn’t reproduce the issue.

The game seems to be working fine today, so unless you are still experience the issue, I’m going to close this report.
If it only works because you implemented a workaround, can you publish a copy of the place with the old version?

Letting you know that we are marking this issue as resolved.
You can submit a separate bug report with new information if you still experience the issue.