# Generating Code, too slow!

**URL:** <https://forum.juce.com/t/generating-code-too-slow/3383>\
**Category:** General JUCE discussion\
**Created:** [November 21, 2008, 11:30am UTC](https://forum.juce.com/t/generating-code-too-slow/3383 "2008-11-21T11:30:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayman](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@jayman](https://forum.juce.com/u/jayman)\
**Post date:** [November 21, 2008, 11:30am UTC](https://forum.juce.com/t/generating-code-too-slow/3383/1 "2008-11-21T11:30:48Z")

</div>

I’m using Visual C++ 2005 Express, when building my projects why is Generating Code take soooo long? I sorta recall seeing somewhere in these forums something about it, but can’t find it…Any ideas? Thanks…

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [November 21, 2008, 1:58pm UTC](https://forum.juce.com/t/generating-code-too-slow/3383/2 "2008-11-21T13:58:29Z")

</div>

Because it’s doing a lot of thinking, I guess… It’ll be slower in a release build because it’ll be optimising everything. Or maybe you’ve not got enough memory so it’s doing a lot of paging?

---

<div class="post-metadata">

**Author:** ![valley](https://avatars.discourse-cdn.com/v4/letter/v/67e7ee/32.png) [@valley](https://forum.juce.com/u/valley)\
**Post date:** [November 21, 2008, 2:08pm UTC](https://forum.juce.com/t/generating-code-too-slow/3383/3 "2008-11-21T14:08:00Z")

</div>

> [@jules](#):
>
> It’ll be slower in a release build because it’ll be optimising everything.

I’m finding the opposite. My app takes around 15 minutes to build in debug, and about 12 minutes in release. I put the difference down to the need to build the extra debug information into the app, and the associated debug databases for VC.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [November 21, 2008, 3:01pm UTC](https://forum.juce.com/t/generating-code-too-slow/3383/4 "2008-11-21T15:01:00Z")

</div>

15 minutes?? My PC is very average - an old core duo laptop - but I can build the juce demo from scratch in about a minute, and the code generation takes less than 10 seconds in debug mode.

Are you building it on a shared drive or something? There must be some kind of bottleneck going on.

---

<div class="post-metadata">

**Author:** ![valley](https://avatars.discourse-cdn.com/v4/letter/v/67e7ee/32.png) [@valley](https://forum.juce.com/u/valley)\
**Post date:** [November 21, 2008, 4:20pm UTC](https://forum.juce.com/t/generating-code-too-slow/3383/5 "2008-11-21T16:20:45Z")

</div>

I haven’t timed the JUCE demo, but a minute or so sounds about right.

I have a handful[1] of recursive includes in my app (a kind of unavoidable side effect of having a deeply integrated interactive scripting language), and that is very costly in terms of compile times. I think, the fundamental though is just that the app is getting a little hefty. I wouldn’t mind but increasingly VC seems unable to incremental builds, so even a few lines of source changed can sometimes trigger a complete rebuild.

I’m running VC inside VMWare, but in general performance is still better on my Macbook than on my three year old Vaio.

[1] not many, but they probably conspire to (re)pick up a lot of other headers in the progress of looping.
