Currently the mercurial ebuild doesn't optimise the hgext python directory, which can result in a severe slow down on startup if a user has enabled any of the affected plugins. The attached patch fixes this by setting PYTHON_MODNAME, so the hgext dir is considered too. It definitely isn't a scientific test but running "time for i in {0..100}; do hg help; done" yields a 75% speed up with the patch applied and the mq extension enabled. It makes a significant difference on my baby epia box, but obviously much less on faster boxes.
Created attachment 88328 [details, diff] mercurial-module_optimise.patch
Fixed in dev-util/mercurial-0.9.1-r1 - thanks for your contribution.