The MATLABWebUI process is a component that handles communication between the MATLAB desktop and web-based UI components, such as the App Designer and Simulink. This process can be resource-intensive, especially when running MATLAB interactively with the desktop GUI.
Batch mode refers to running MATLAB scripts or functions without the interactive desktop environment. This is typically done using the -batch command-line option, which allows MATLAB to execute commands without launching the full GUI, thus avoiding the MATLABWebUI process.
Running MATLAB Without MATLABWebUI
Unfortunately, when running MATLAB interactively with the desktop GUI, the MATLABWebUI process is necessary for the proper functioning of web-based UI components. This process is a Java-based Chromium Browser (JCEF) process responsible for running MATLAB’s UI. JCEF is known to require a significant amount of virtual memory, which explains the spike in memory consumption. These processes are used for editor rendering and other windows in MATLAB, such as the add-ons explorer. Every editor window is a “MATLABWebUI” process, hence the high memory usage.
However, there are a few strategies you can try to mitigate the resource usage:
1-> Disable Unnecessary Toolboxes: If you are not using certain toolboxes that rely on web-based UI components, consider disabling them to reduce the load.
2-> Use Command-Line Interface: For tasks that do not require the full GUI, consider using MATLAB in command-line mode. This can be done by launching MATLAB with the -nodesktop option, which provides a command-line interface without the full desktop environment. You can start MATLAB with the -nodesktop flag by running the following command in the terminal
If these suggestions do not resolve the issue, you might want to reach out to MathWorks support for more tailored advice at https://www.mathworks.com/support/contact_us.html. They can provide specific guidance based on your use case and system configuration. Hope this helps!