Check out canvas object, I recall seeing great example of worms like terrain done with it so search for that as well. :)
And yes, million little objects would be performance killer. Thousand or few could be doable, but anything more would kill the performance.