24

I'm a long time Eclipse and Force.com IDE user. I recently switched the the v31 (open source re-write) Eclipse plugin and discovered that the save times for Apex and Visualforce are drastically faster.

In v30 it took approx 10secs (in Sydney) to save a class. With v31 it's down to less than 2secs.

I'm also starting to use Mavensmate and I'd love to see similar save performance there. I know that you can change the settings in Mavensmate but I don't know which combination makes it use the same API's as the new Eclipse plugin.

Does anybody know which settings and API's should be used to get the best save/compile performance in Mavensmate? Sublime is a great editor but it would be even better if it could compete on save speed.

Thanks.

2
  • Hi Steve, could you have a look at the issue here github.com/joeferraro/MavensMate/issues/361 and provide some logs? I can't say mine has become slower in the new release (have you done the 1 time reinstall/update for version 4 of the system? mavensmate.com/Upgrade_Help If you can provide some of that info then it may get the ball rolling.
    – pbattisson
    Oct 23, 2014 at 20:24
  • So with V 5 of Maven, this slow compile and save is not MINUTES. In fact I am not sure that I have successfully gotten a file to save and compile. I was forced into V5 with auto update, but this is crazy. Any thoughts?
    – user25104
    Sep 30, 2015 at 16:57

3 Answers 3

16

My whole team except one rebel (lets call him Luis) switched from Eclipse to MavensMate some time ago. Mocking Luis and his 10+ second save times were a regular feature of our day...we enjoyed much faster save times, especially if this setting is set in any of Project, User or Default settings (MavensMate->Settings):

"mm_compile_with_tooling_api" : true

I don't know for sure, but I would think that Eclipse is using the Tooling API over the metadata API so this setting should make it the same.

PS. After upgrading to the latest version of Eclipse IDE, Luis is now enjoying much faster save times...on the face of it (i.e. watching Luis demonstrate/gloat), it does appear very responsive.

4
  • 3
    Yeah, I've tried setting mm_compile_with_tooling_api to true in all 3 files but it doesn't seem to make any difference in save speed. It's frustrating because save speed is the worst for maintaining "flow" when writing code. Sublime is such a good editor but the save speed is stopping me from using it - I hope someone can provide the answer for us all. Oct 15, 2014 at 23:53
  • BTW: I've been digging through the Eclipse plugin source at github.com/forcedotcom/idecore to try and find where it's save code exists. No luck so far so anyone that knows this codebase could help by pointing that out as well Oct 16, 2014 at 0:09
  • Hmm, interesting, MM was always much quicker than Eclipse prior to the upgrade Oct 16, 2014 at 7:02
  • 1
    Phil, I saw the same thing but the bar has just been raised by the the Eclipse Force.com IDE project. I'm hoping we can see the same happen in MM so all developers can maintain their flow (although the Arcade games in MM are an excellent idea) Oct 17, 2014 at 1:17
4
+25

I can only confirm what @SteveBuikhuizen said: regardless of the settings mm_compile_with_tooling_api, the save in MavensMate keeps being slow. I tried it on Mac and Windows and in different versions. My performance is constantly about 14 seconds.

Using ToolingAPI, the save-time should be between 3 - 5 seconds. I have implemented a native and free IDE CodeFusion (http://www.elastify.eu/apps/CodeFusion), which uses ToolingAPI from within APEX and from Germany my typical speed is about 3.7 seconds. Switching to MetadataAPI (CodeFusion supports both Meta and Tooling), it ends up with about 8 seconds. Again the 8 seconds I got with older versions of the eclypse plugin and v31 brings me about 4 seconds.

I totally agree, that save time is crucial. Not one single second is to waste, since it sums up during a work-day and slow saves also bring you in a bad mood - which is not good for creativity.

After implementing a save-method on my own, I see one thing which can really could be done differently. Either using ToolingAPI or MetadataAPI the call will be made asynchronously. That means you have to poll frequently, to get the current status of the async call. Now you have two choices: either you poll as fast as you can, which leads to a high local resource usage or you do it in slower intervals and waste less power for polling - but of course may get the completion later as you could.

Now my polling is done with JavaScript and I found a throttle of about 500ms for MetadataAPI and 0ms for ToolingAPI between polls as optimal. CodeFusion lets you play with that throttle. I can only imagine that some kind of poll-interval setting slows down the save performance in MavenMate. The callout itself should be fast. Maybe this helps you or the developers to speed it up.

You can compare that also to www.aside.io which does something similar from heroku with a comparable performance.

I'm also in contact with some guys from Mavens and I will forward this link to them an maybe they have an idea. Would really love to see MavensMate save as fast as possible.

4
  • Just a small footnote: for me, this was not a recent degregation or change in performance, but constant phenomenon. I got this speed the first time I tried MavensMate early in 2014 and it didn't change until now (2014-10).
    – Uwe Heim
    Oct 24, 2014 at 9:02
  • hey @uwe-heim just a follow up to see if you got any response from mavens team on the slow performance in saving a file .. let us know if you had any luck Dec 11, 2014 at 2:30
  • Nothing so far. @KevinP seems to have located the reason in the source.
    – Uwe Heim
    Dec 11, 2014 at 9:24
  • Same for me as Uwe - it was never fast even with the Tooling API enabled. Dec 17, 2014 at 20:19
2

I believe I've made some progress on this. As Uwe wrote, the requests to the tooling api are made asynchronously. Looking into the source of the underlying mm tool, I've discovered where (I believe, my python is a bit rusty) the async code is being executed.

https://github.com/joeferraro/mm/blob/41f41788af0f95561d87e60a63eb50d3263a656d/mm/sfdc_client.py#L384-L397

That bit of code, if I'm reading it correctly establishes a while loop that immediately sleeps for 1 second.

The actual post/patch of the content is done in the lines above.

As soon as I can figure out how to compile mm from the python into the "frozen" version used by the sublime text plugin I'll test the effects of adjusting the sleep time, and a few other optimizations.

3
  • Any luck with this Kevin?
    – Phil B
    Dec 2, 2014 at 21:14
  • @philB, Sadly no. I've not yet figured out how to "compile" down and use a modified version of the mm tool. there's simply no documentation that I've found.
    – Kevin P
    Dec 3, 2014 at 11:35
  • For what it's worth, I appreciate your efforts Kevin. The community will all be surprised at the speed increase once this is fixed. Dec 17, 2014 at 20:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .