Skip to content

Commit 46abd72

Browse files
committed
Moar java_args
1 parent b8fe164 commit 46abd72

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

processing_app/demos/graphics/Rakefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
# Simple demo Rakefile to autorun samples in current directory
2-
# excludes planets.rb which needs flag to run
3-
# adjust path to rp5 executable, and or opts as required
2+
# adjust path to jruby, ARGS, and or opts as required
3+
# NB: use `-J-` prefix to send java args via jruby
44

5-
SAMPLES_DIR = './'
5+
SAMPLES_DIR="./"
6+
ARGS = '-J-XX:InlineSmallCode=500 -J-Xms256m -J-Xmx2g -J-XX:NewSize=64m -J-XX:MaxNewSize=64m'
67

78
desc 'run demo'
8-
task default: [:demo]
9+
task :default => [:demo]
910

1011
desc 'demo'
1112
task :demo do
12-
list = samples_list.reject { |sample| sample =~ /planets/ }
13-
list.shuffle.each { |sample| run_sample sample }
13+
samples_list.shuffle.each{|sample| run_sample sample}
1414
end
1515

1616
def samples_list
1717
files = []
1818
Dir.chdir(SAMPLES_DIR)
19-
Dir.glob('*.rb').each do |file|
19+
Dir.glob("*.rb").each do |file|
2020
files << File.join(SAMPLES_DIR, file)
2121
end
2222
return files
2323
end
2424

2525
def run_sample(sample_name)
2626
puts "Running #{sample_name}...quit to run next sample"
27-
open("|jruby #{sample_name}", 'r') do |io|
27+
open("|jruby #{ARGS} #{sample_name}", "r") do |io|
2828
while l = io.gets
2929
puts(l.chop)
3030
end

0 commit comments

Comments
 (0)