tvheadend/tvheadend — pull request #299 by gokl (2013-10-24 14:48:40+00:00)
Title: Do constant time language code lookups

Currently _lang_code_get does a simple O(n) search to find the language code. This creates a lot of strcmp calls (there are over 450 languages registered). These strcmp calls do show up pretty high in a profiler like callgrind.
I changed the lookup to a hashmap implementation and verified the results with callgrind.