Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Update jar_installer.rb #7
The IO.read method reads the entire JAR file into RAM. In our environment the jar file is roughly 900MB. This was causing Out of Memory exceptions on our machines.
This proposed change will leverage the remote_file resource and the source attribute. The file is still read from the local cache directory. The file is buffered much more effectively when taking this approach.
I also propose updating the action to only create the file if it is missing.
This change reduced the memory consumption of this resource by more than an order of magnitude. This change also reduced the execution duration for this resource by roughly 10 seconds in our environment.
Please let me know if you have any questions.