Ouch... have you wired a single resistor for each LED? That's going to waste a shitload of power. If the forward voltage of the LED is 3.5V and your source is 9V then the resistor has 5.5V over it. If the current is 10 milliamps then the resistor is dissipating (wasting) 55 milliwatts per LED, with the LED itself consuming a further 35 milliwats. Multiply this by 40 and you're looking at some serious inefficiency.
Only 38% of the available power is used to light the LED, the rest is wasted...
|