我能为Anypoint Studio更快地运行项目做些什么?当我运行一个简单的项目时,我需要等待将近20秒。我的电脑是一款全新的macbook pro touch i7。当我在使用Windows 10的VM中运行时,执行速度非常快。对我来说没有任何意义我尝试了许多清除缓存,将内存增加到Anypoint,但没有解决我的问题。 : - (
提前致谢: - )
答案 0 :(得分:0)
尝试maven项目。在运行配置中,尝试将此添加到maven命令 -DskipTests = true
答案 1 :(得分:0)
当我的计算机没有连接到任何网络时,我发现我的Anypoint运行缓慢(等待几秒钟来运行项目),当我在某个网络中连接我的MAC时,Anypoint工作正常。对我没有意义......
答案 2 :(得分:0)
以下步骤将改善某些性能。 (对于Windows)
答案 3 :(得分:0)
我知道这是一个非常老的问题,但无论如何我想为新用户提供一个视角。
由于我们谈论的是Anypoint Studio,因此我首先要问您使用的是哪个版本的Studio。
是基于m子4还是基于3子3?!
Mule 4 by default is embedded with maven unlike Mule 3, which is considered as Mule 4's little bother
。
如果您使用的是m子4,则必须确保每次运行项目时都必须初始化并执行maven。没办法。
因此,如果需要30秒,则必须花费30秒。它必须加载您的配置和模块!
老实说,作为一名全职MuleSoft Developer,我经历了比使用pom maven依赖项仅加载几个特定文件的等待时间多于30秒的方式。平均2分钟。当您的计算机内存被其他桌面应用程序最大使用时,等待时间将急剧增加。
但是仍然没有丢失。请按照以下步骤操作,您的一天会变得明亮而快乐。
1. Enable skip munits test while program build.
+Pass `mvn clean package -DskipTests` in Windows CMD.
(Note: This applies if you are building your APP target without studio)
+Or pass `-DskipTests=true` in Maven Command Line Args in the studio run configurations.
2. Increase your java heap size through `AnypointStudio.ini` file.
> -Xms1024m
-Xmx2048m
-XX:MaxPermSize=1024m
+You can also add these in your run configurations with the `- D` tag before the above specified arguments. Try to understand what these arguments are used for !
选中此链接:What are the -Xms and -Xmx parameters when starting JVM?
3. Go to studio`s main exe directory > plugins > mule 4.x.x server (or 3.x.x server) > mule > logs. Here you will find all your application logs you recently ran individually. Clear your logs.
4. Always flush your %temp% directory before you start using the Studio.
5. Never use unnecessary maven dependencies. Remove the unused.
5. Finally close your workspace properly each time you shutdown.
希望这个答案有帮助!
答案 4 :(得分:-1)
请检查RAm。您的计算机RAM至少应为8 GB,以便任何工作室工作。