It is better to decompose into smaller functions. If these functions are named clearly, it will make the code much more readable and it will make debugging much easier as well. Think about what the stack trace would look like using this more modular approach vs. the all in one function approach. The fact that these functions are only called in one place doesn't reduce any of these benefits. Each function should do one thing and do that one thing well. That one thing may include combining the results of some of the functions into a simple interface for the consumer of the functionality. Ultimately, this approach will lead to more compact functions which will make your code much easier to understand. Much worse than having to jump around from one function definition to another (which your IDE should facilitate) is having to scroll through screen after screen of code within one method and trying to keep track of what exactly is going on in your head. Bob Martin has a [great post][1] about this with a detailed example. [1]: https://sites.google.com/site/unclebobconsultingllc/one-thing-extract-till-you-drop