LocaleToScriptMappingDefault.cpp has 2 static hash maps with a large number of values (108 and 196). We should initialize these to a larger capacity so we don't start from 8 and churn through their growth.
Created attachment 208873 [details] Patch
Comment on attachment 208873 [details] Patch Tweaking the size of these hash tables is OK. But a way better thing to do would be to not use a hash table for this. There is suitable code in the quotesForLanguage function in RenderQuote.cpp that we could generalize, put in WTF, and use here.
That sounds interesting. I can look into refactoring this. Should this patch be abandoned or should we check this in for now while we investigate a better approach?
I don’t feel strongly either way; fine to land this. But way better to not dynamically created hash tables for this long term. Generally speaking we want to build tables at compile time. I must admit I’m not sure why we chose to use gperf for some things like this, but not for others. Maybe we should be using gperf more consistently?
Comment on attachment 208873 [details] Patch OK to land for now, but we should do better, as I mentioned.
Thanks for the review. I'll look into factoring out the code from RenderQuote.
Committed r154347: <http://trac.webkit.org/changeset/154347>