I've seen the response here, but the built-in script is excruciatingly slow (I let it sit for 3 hours before giving up) and the custom one in the response thinks there's only one layer (and only exports one PNG). What are my options?
EDIT: I actually want to save each layer to a separate PNG, not export the current visible layers to a single PNG.
As the original author of the script linked through OP's post and in an effort to give this question some closure, I'd like to say that most likely the document that Fibericon was trying to save had some layer groups which my original script couldn't handle. It has since been updated.