> > > With the fix, I can use LyX without the Messages cache and I hardly >> notice any delays (compare this to the 2.6 second delay for each update >> before). >> > > This is pretty nice :) I was wondering how gettext could impair this much > the performance. On linux GuiView::updateToolbars goes down from 900usec to > 450usec. It is nice but does not make much of a difference. > > Do you still feel that it is worth keeping the Messages cache? >
Yes, I think we should. On Windows, it takes around 200-250usec to get a translated message, while on Linux you estimated it as 5usec. So, the issue might pop up in other situations as well, even though there are no problems on Linux. On a side note, approximately 160-180usec is spent in setting and unsetting the environment variables. I'd expect that this would not be needed to do for each translation request. Removing those calls from the Messages::get function would reduce the time to 40-50usec for each call. I don't know right now why it is still much slower than the 5usec on Linux. Vincent