You can optimize performance by breaking projects into modules. This strategy spreads the load out to more cores, thereby increasing throughput.
Use modules to double, quadruple, and so on, the number of partitions, with very little additional code. The more partitions you create, the more you distribute the load.
For information on modularity, see the Programmers Reference, the Continuous Computation Language chapter in the Getting Started Guide, and the Submodules example provided in your examples folder.