[ start | index | login ]
start > Improving Build Speeds

Improving Build Speeds

Created by mpecher. Last edited by mpecher, 6 years and 21 days ago. Viewed 863 times. #1
[edit] [rdf]
labels
attachments

Speeding Up Build Times

There's a few things you can do to your local PC to optimise the speed of your build. Here's some of those suggestions:
  1. Increase your Ant Memory Settings
  2. Turn off virus scanning for your sourcecontrol view
  3. Run a nightly defrag on your machine

Increase your Ant Memory Settings

You can set an environment variable that will get picked up by Ant and passed to the JVM when it starts up. One of the useful things to do there is increase the heap size used by the JVM. Here's a good example:
SET ANT_OPTS=-Xms256m -Xmx512m
If you do that in your system environment variables, it will permanently stay on even when you start up a new command window.

Disable virus scanning on your view

To disable virus scanning for your view, follow these steps:
  1. Right click on the Virus Scan icon in your task bar
  2. Select "On-Access Scan Properties..."
  3. A dialog box should pop up showing the virus scanning properties
  4. Select the "All Processes" icon on the left-hand side
  5. Click on the "Detection" tab at the top
  6. Click on the "Exclusions" button near the bottom
  7. A dialog box should pop up showing the exclusion properties
  8. Click the "Add..." button
  9. A dialog box should pop up allowing you to add an item
  10. Make sure "By name/location" is selected
  11. Type in "C:views" into the box (or whatever the location of your views are)
  12. Check the box marked "Also include subfolders"
  13. Select "Ok" in each of the dialog boxes until they're all closed

Nightly Defrag

A new view created for the project has a few hundred megabytes of data in it. A full build generates a few gigabytes of data from that initial set. Continual cleans and re-builds can cause the disk to becomes fragmented fairly quickly. Tests have shown that a defragmented disk will run a build 5-10 minutes faster than a fragmented disk.

You can set up a defrag tool to run overnight whilst you are not here to keep your machine clean. Note that you will have to leave your machine on to do it.

  1. Open up Control Panel | Scheduled Tasks
  2. Double click on 'Add Scheduled Task'
  3. The Scheduled task wizard should pop up
  4. Click 'Next'
  5. Click 'Browse'
  6. Select 'C:WINDOWSsystem32defrag.exe'
  7. Click 'Open'
  8. Select 'Daily'
  9. Click 'Next'
  10. Set the start time to '1:00 AM'
  11. Click 'Next'
  12. Your user name should be defaulted. Type in your password.
  13. Click 'Next'
  14. Select 'Open advanced properties for this task when I click Finish'
  15. Click 'Finish'
  16. Change the command in the 'Run' field to say C:WINDOWSsystem32defrag.exe C:'
  17. Click 'OK'
  18. Enter your password
no comments | post comment

Menu:
Java & J2EE
Development
Books

Help:
Help FAQ
Formatting


< May 2012 >
SunMonTueWedThuFriSat
12345
6789101112
13141516171819
20212223242526
2728293031


Logged in Users: (0)
… and a Guest.



Disclaimer: Views and opinions are that of the individual author, and not that of Marand Custom Solutions. This site is an open forum for technical content, and the company accepts no liability for any content or view expressed.