From my experience, when a pair eats its eggs, it usually has to do with one of several problems...including: small spawn, poor water conditions, ecto-parasites bothering pair, internal parasites bothering pair, shadows above the tank or even movement around the tank. It is always advisable to clean up the pair just before they spawn with either Potassium Permanganate, a 3% salt dip, formalin or 35% HP. Also, deworm the pair every few months for nematodes and/or tapeworms. This will ensure a healthy pair that will produce healthy fry that will grow much easier and faster.
-Ryan