New Luau Type Solver causing extremely high memory usage

With the launch of the new Luau type solver, we’ve noticed a sharp increase in memory usage in our test place for Funky Friday.

From our understanding, the new type solver is trying to analyze a folder consisting of the charting for each song in the game. Each chart is stored in a ModuleScript. For demonstration purposes, we created a new empty base plate with only the chart files and compared the memory usage in different scenarios.

Memory usage in an empty base plate:
1

Memory usage after importing all the chart files with UseNewLuauTypeSolver disabled
2

Memory usage after saving/publishing with UseNewLuauTypeSolver disabled (all chart files are in)
3

Memory usage after enabling UseNewLuauTypeSolver
4

This memory usage issue makes play solo testing in studio impossible as our staging place with our maps and other assets can exceed 30gb+ of RAM and typically crashes studio.

Current PC is a Ryzen 9000 series, paired with 96gb of ram and a RTX 4090.

Beta features:

  • Assisted Mesh Generation
  • Avatar Joint Upgrade
  • Dragger QoL Improvements
  • Improved Constraint Tool
  • Multi-line Command Bar
  • New Video API
  • Next Gen Studio Preview
  • Proximity Prompt Indicators
  • Revamped Asset Manager
  • UIDragDetectors
  • User Provided Default Instances
  • Video Upload

A private message is associated with this bug report

1 Like

Hello! Yep, the new solver can definitely use more memory than the old solver, but you’re right that looks like way more than is acceptable, especially if it’s crashing Studio.

I would recommend turning off the new solver for now: we know it’s not going to work for every established place out of the box, but thanks for providing a place we can optimize memory usage against. I’ll circle back once we land some fixes here :slight_smile:

Thank you for the response!

Has there been considerations to add ignore lists to the type solver for situations like this? Given that the module scripts just contain data, there isn’t really any need to have type checking for those particular scripts in the place.

Has there been considerations to add ignore lists to the type solver for situations like this? Given that the module scripts just contain data, there isn’t really any need to have type checking for those particular scripts in the place …

Great question. The hope is that we can still infer data-like tables (like I’m seeing in your place) without using a ton of memory. I’m not sure we’ve considered adding ignore lists, but we’ve talked about exposing something that isn’t necessarily Luau for data. Nothing concrete, more “there could be something better than dumping 50MB worth of strings into a ModuleScript.”

Hello! We’ve shipped a slight improvement to the memory usage for data-like tables. I’m able to load your place and get type analysis information (autocomplete, errors, etc.). The memory usage is still high, but lower than before. Would you be able to try out the new solver and see if the memory usage is acceptable?

Hey again! It’s been a while and we’ve shipped some general improvements to the new solver’s memory usage. If you are still running into issues, feel free to open up another ticket, but I am going to close out this one.