Recent versions of 3ds Max can run into bugs where animation layer issues cause slow performance. The tricky part is that a scene may not show any errors or notifications, so it's hard to tell whether bugged animation layers are present at all. AnimLayerCleaner is a MAXScript built to detect and remove those problematic layers.
The script covers two operations: checking a scene for bugged animation layers and cleaning them out. Removing the affected layers is aimed at restoring smoother performance and a bug-free experience.
AnimLayerCleaner installs through the Scripting menu using Run Script, or by dragging the .mcr file into the viewport. Once loaded, you add it from the Customize User Interface dialog under the markulie category and drag it onto a toolbar to open it. It's released under the MIT license, with the full source available on the developer's GitHub page.