the battery dies after an hour or two even if the lights are off.
Something is really off. 4*AA good quality alkaline battery should have ~3000mAh capacity at low current, decent AA NiMh should have ~2000mAh capacity at even high drain. (Ikea's white made in Japan Ladda are recommended by a lots of people as those are assumed to be rebranded Eneloop Pros, and pretty cheap for that)
The EspruinoBoard (do you use that?) shouldn't draw a huge amount of power even when idling. So even if that is running at max power, that's not even close to draining your battery
Assuming @allObjects's 300mA idle drain that should still run for 6-8 hours. Can you check the power drain with a multimeter?
But 300 neopixels can draw a lot of current (300 * 60mA on all LED's full brightness = 18 Ampers!) Not even the best AA batteries can supply that amount of current. That's the power range of decent 18650 LiIon's designed for power-tool use.
What kind of battery do you use?
Do you really have 300 neopixels? If you do, and want to turn on all of them, definitely need a lot beafier battery! You can check battery tests by HKJ to figure out what kind of battery you need for the runtime you want.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Something is really off. 4*AA good quality alkaline battery should have ~3000mAh capacity at low current, decent AA NiMh should have ~2000mAh capacity at even high drain. (Ikea's white made in Japan Ladda are recommended by a lots of people as those are assumed to be rebranded Eneloop Pros, and pretty cheap for that)
The EspruinoBoard (do you use that?) shouldn't draw a huge amount of power even when idling. So even if that is running at max power, that's not even close to draining your battery
Assuming @allObjects's 300mA idle drain that should still run for 6-8 hours. Can you check the power drain with a multimeter?
But 300 neopixels can draw a lot of current (300 * 60mA on all LED's full brightness = 18 Ampers!) Not even the best AA batteries can supply that amount of current. That's the power range of decent 18650 LiIon's designed for power-tool use.
What kind of battery do you use?
Do you really have 300 neopixels? If you do, and want to turn on all of them, definitely need a lot beafier battery! You can check battery tests by HKJ to figure out what kind of battery you need for the runtime you want.