<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        
                                        
                                            
                                        
                                        
                                        Hi Eliot.<div><br></div><div>Hmm... in 2010 there was a change in String >> #translated to also include some kind of domain knowledge based on "thisContext sender method". (I suppose it got merged with all Etoys changes in Squeak 5.1).</div><div><br></div><div>['world' translated] bench.</div><div>---NO DOMAIN LOOKUP --- '847,000 per second. 1.18 microseconds per run. 3.69926 % GC time.'</div><div>---DO DOMAIN LOOKUP  --- '9,190 per second. 109 microseconds per run. 3.57928 % GC time.'</div><div><br></div><div>Given that there are 1558 senders in a Trunk image, this might be worth improving. :-)</div><div><br></div><div>I propose to change #translatedInAllDomains, which is kind of a "detect" looking desperately for some translation that has not the given form.... enumerating all package names along the way to be used as domain names.</div><div><br></div><div>Domain names are for GetText support. Each .mo file can represent a different domain. Such a modular separation helps external tools (and humans) to better browse and understand the kind of translation that is needed. It's rather common practice, I suppose.</div><div><br></div><div>Maybe we should just support a wildcard '*' as valid domain name and then let the GetTextTranslator figure out how to enumerate all the accessible .mo files?</div><div><br></div><div><div><span style="font-size: 13.3333px">String >> translatedInAllDomains</span></div><div><span style="font-size: 13.3333px"><span style="white-space:pre"> </span>^self translatedTo: LocaleID current inDomain: '*'</span></div></div><div><br></div><div>['world' translated] bench.<br></div><div><span style="font-size: 13.3333px">---WILDCARD---  '408,000 per second. 2.45 microseconds per run. 1.55938 % GC time.'</span><br></div><div><br></div><div>Now somebody has to change GetTextTranslator. I hope it does not break any generic GetText support to enumerate all .mo files in a locale directory.</div><div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div>
                                        
                                        <blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 28.10.2020 06:59:07 schrieb Eliot Miranda <eliot.miranda@gmail.com>:</p><div style="font-family:Arial,Helvetica,sans-serif">
<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size: 14pt">Hi All,</div><div class="gmail_default" style="font-size: 14pt"><br></div><div class="gmail_default" style="font-size: 14pt">    I have occasion to simulate the simulator (chancing down a context manipulation bug).  In doing so I notice that there seems to be some awful ) N^2 behaviour in doing things as straight-forward as setting up the world menu.  Here's a back trace from the simulator of a current trunk image:</div><div class="gmail_default" style="font-size: 14pt"><br></div><div class="gmail_default" style="font-size: 14pt"><div class="gmail_default">  16r3061C8 M Dictionary>associationsDo: 16r16BC028: a(n) Dictionary</div><div class="gmail_default">  16r306200 M Dictionary>keysDo: 16r16BC028: a(n) Dictionary</div><div class="gmail_default">  16r306238 M [] in Dictionary>keys 16r16BC028: a(n) Dictionary</div><div class="gmail_default">  16r306280 M Array class(SequenceableCollection class)>new:streamContents: 16r16FA068: a(n) Array class</div><div class="gmail_default">  16r3062C0 M Dictionary>keys 16r16BC028: a(n) Dictionary</div><div class="gmail_default">  16r3062F0 M PackageOrganizer>packageNames 16r1540BE8: a(n) PackageOrganizer</div><div class="gmail_default">  16r306320 M TextDomainManager class>allKnownDomains 16r188A848: a(n) TextDomainManager class</div><div class="gmail_default">  16r306358 M ByteString(String)>translatedInAllDomains 16r3479FF8: a(n) ByteString</div><div class="gmail_default">  16r306390 M ByteString(String)>translated 16r3479FF8: a(n) ByteString</div><div class="gmail_default">  16r3063D8 M [] in TheWorldMenu>fillIn:from: 16r3C93C0: a(n) TheWorldMenu</div><div class="gmail_default">  16r303F38 M Array(SequenceableCollection)>do: 16rB681C8: a(n) Array</div><div class="gmail_default">  16r303F70 M TheWorldMenu>fillIn:from: 16r3C93C0: a(n) TheWorldMenu</div><div class="gmail_default">  16r303FC0 I TheWorldMenu>addSaveAndQuit: 16r3C93C0: a(n) TheWorldMenu</div><div><br></div><div>I.e. for every item in the world menu we are enumerating over all packages.  Shurely shome mistake, hic!, ed.</div></div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-size: 10pt;border-collapse: separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div></div>
</div></blockquote></div>