viewer enhacements

- be generous on buffering (FIXME: crasher lurking)
- add primitive benchmarking
- FIXME: there is (at least one) memleak around.
nitpick
(WIP) avoid memleak
yup, another crasher.