cache highlighters to optimise
authorJoey Hess <joey@gnu.kitenet.net>
Sat, 23 May 2009 22:39:49 +0000 (18:39 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Sat, 23 May 2009 22:39:49 +0000 (18:39 -0400)
commit39e5e250006421535c13b97e9ca28600c8447877
treefcaad44bc96a42702cda726f88f5c4e3541b9801
parent8ba98ad1dcbffe32150745c98d72512a6fa6149e
cache highlighters to optimise

Setting up a new highlighter object is slightly expensive since it
reads and parses the langfile each time. So cache them.

This also speeds up ext2langfile by avoiding it needing to check for the
existence of a language file in some cases.
IkiWiki/Plugin/highlight.pm