Permalink
Browse files

after compile, force GC

  • Loading branch information...
1 parent 34fbb4b commit c4776e888dbfd2f163c1620938b72a27eb39cd13 @tka tka committed Jun 27, 2013
Showing with 33 additions and 4 deletions.
  1. +5 −0 Info.plist
  2. +3 −1 bin/startJar-linux.sh
  3. +1 −1 build_configuration.rb
  4. +22 −0 src/app_watcher.rb
  5. +2 −2 src/compile_version.rb
View
@@ -45,6 +45,11 @@
<array>
<string>-Dfile.encoding=utf8</string>
<string>-Xverify:none</string>
+ <string>-Xss1m</string>
+ <string>-XX:-UseParallelOldGC</string>
+ <string>-XX:NewRatio=4</string>
+ <string>-Xmx384m</string>
+ <string>-Xms128m</string>
<string>-Xbootclasspath/p:$APP_PACKAGE/Contents/Resources/Java/lib/java/jruby-complete.jar</string>
</array>
</dict>
@@ -5,5 +5,7 @@ bundle exec rake rawr:jar
#"-Djruby.compat.version=1.9" \
#java -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Djruby.reify.classes=true \
-java -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails \
+#java -XX:-UseParallelOldGC -XX:NewRatio=4 -Xmx384m -Xms128m -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails \
+#java -XX:+PrintGCTimeStamps -XX:+PrintGCDetails \
+java -XX:-UseParallelOldGC -XX:NewRatio=4 -Xmx384m -Xms128m -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails \
-client -Xverify:none -Xbootclasspath/a:lib/java/jruby-complete.jar -jar package/jar/fire-app.jar $@
@@ -68,7 +68,7 @@
# Undocumented option 'jvm_arguments'
# default value: ""
#
- c.jvm_arguments = "-Xss1m"
+ c.jvm_arguments = "-Xss1m -XX:-UseParallelOldGC -XX:NewRatio=4 -Xmx384m -Xms128m"
# Undocumented option 'java_library_path'
# default value: ""
View
@@ -14,6 +14,28 @@ def initialize(project_path, watches=[], options={}, poll=false)
setup_listener
end
+ def listen_callback(modified_file, added_file, removed_file)
+ #log_action(:info, ">>> Listen Callback fired added: #{added_file}, mod: #{modified_file}, rem: #{removed_file}", {})
+ action = nil
+ action ||= :modified unless modified_file.empty?
+ action ||= :added unless added_file.empty?
+ action ||= :removed unless removed_file.empty?
+
+ files = modified_file + added_file + removed_file
+ # run watchers
+ sass_watchers.each do |watcher|
+ files.each do |file|
+ if watcher.is_a? Array # for compass 0.12 watcher format
+ glob,callback = watcher
+ callback.call(project_path, file, action) if File.fnmatch(glob, file)
+ else
+ watcher.run_callback(project_path, file, action) if watcher.match?(file)
+ end
+ end
+ end
+ java.lang.System.gc()
+ end
+
def watch!
compile
super
@@ -1,5 +1,5 @@
module CompileVersion
- REVISION = '5af383b9ee'
- COMPILE_TIME = '201306181508'
+ REVISION = '34fbb4b6df'
+ COMPILE_TIME = '201306280230'
UPDATE_URL = ''
end

0 comments on commit c4776e8

Please sign in to comment.