Skip to content

Commit

Permalink
Set a global -Xmx default for JVMs
Browse files Browse the repository at this point in the history
Note that ZincCompile retains a much higher default.

Also note that all current Pants repos override this
in pants.ini anyway, so this is primarily so that new
users can get up and running with some sort of sensible
default.

256M was chosen as a compromise between having to little
memory to get anything done and having several nailguns
chew up all RAM on the system.

Testing Done:
CI passes: https://travis-ci.org/pantsbuild/pants/builds/123511811

Reviewed at https://rbcommons.com/s/twitter/r/3705/
  • Loading branch information
benjyw committed Apr 19, 2016
1 parent 4b2c796 commit 416423f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/python/pants/backend/jvm/subsystems/jar_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
class JarTool(JvmToolMixin, Subsystem):
options_scope = 'jar-tool'

@classmethod
def get_jvm_options_default(cls, bootstrap_option_values):
return ['-Xmx64M']

@classmethod
def register_options(cls, register):
super(JarTool, cls).register_options(register)
Expand Down
2 changes: 1 addition & 1 deletion src/python/pants/backend/jvm/subsystems/jvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class JVM(Subsystem):

# Broken out here instead of being inlined in the registration stanza,
# because various tests may need to access these.
options_default = []
options_default = ['-Xmx256m']

@classmethod
def register_options(cls, register):
Expand Down
2 changes: 1 addition & 1 deletion src/python/pants/backend/jvm/subsystems/jvm_tool_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def get_jvm_options_default(cls, bootstrap_option_values):
See src/python/pants/options/options_bootstrapper.py for
details.
"""
return []
return ['-Xmx256m']

@classmethod
def register_options(cls, register):
Expand Down

0 comments on commit 416423f

Please sign in to comment.