doc: more on optimizations and good practices