play2.0 + scala2.11 + idea14 performance

I've always found the official "Play 2.0" support to be almost unusably slow with my project. It appears to re-initialize sbt from scratch every time, which means it has to parse the entire sbt configuration and check dependencies before it can do anything. "Making" my project with no changes in it takes around 1 minute before it starts running my tests, which is really not a very usable development cycle. In IDEA 13, I worked around this by just not enabling the Play 2.0 plugin, but I no longer have this option.

Am I the only person experiencing this, or perhaps the only person that cares? Anybody got a workaround for IDEA 14? I'd really like to be able to run my tests as fast as I can with SBT, which is < 10 seconds as long as I leave the sbt console running.

4 comments
Comment actions Permalink

No, you're not the only one. See this thread for other comments on this: https://devnet.jetbrains.com/thread/458199?tstart=0

I have found that if I remove the "play2_project_settings.xml" file from the .idea directory then Idea14 will revert to using the regular scala compiler instead of the Play2 compiler. Effectively this turns off the Play2 part of the plugin.

-- Doug

0
Comment actions Permalink

Thanks Doug, being able to disable play2 will help a lot. The other thread outlining the issues migrating config from Idea13 to Idea14 was helpful too, I had ignored it since it didn't seem performance related.

I'd very much like to hear from JetBrains what their plans are regarding play support. From my perspective, if they could keep sbt running as a second variety of compile server it would be WAY better than it is now. Combine that with the ability to turn it on and off and we'd be much better off.

0
Comment actions Permalink

Hello,
could you please capture a CPU snapshot of compiler process? Instruction is here http://confluence.jetbrains.com/display/IDEADEV/External+Builder+API+and+Plugins in the section "Profiling external build process". Note you can find Idea system paths here https://devnet.jetbrains.com/docs/DOC-181  .


Best Regards,
Dmitry Naydanov

0
Comment actions Permalink

Thanks Dmitry,

I tried the instructions above, but was never able to find any generated snapshots. Not sure if it's simply user error or what.

However, I think the root of the problem is that the play framework support doesn't really use the persistent compile server. For every compile, the first line of the output I see is this: Information:Play 2 Compiler: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0

Note that I've removed the MaxPermSize option from my compile server options!

Regardless, this means that for every compile it's starting SBT from scratch, which is really slow. If it were to simply start it and leave it running, performance would be much much better. Then fire a reload if any .sbt or Project/* file changes, just a usual compile otherwise, and we're good to go.

0

Please sign in to leave a comment.