A tip for anyone using Max and exporting a lot of models via KOTORMax and starting to experience slowdown in the process. Open a Listener window (F11) and type/paste in:
gc()
This is the inbuilt "garbage collection". It's supposed to run automatically, but I think it is probably broken on modern systems with oodles of RAM. Note that this will flush the undo buffer, so probably don't do it while in the middle of editing a file.