From: Carl W. B. <cb...@xn...> - 2001-07-28 04:16:58
|
Markus & George, I will withdraw the proposal. I will keep the table that I have built and use it to validate new and hopefully beta releases of ICU. The overhead was in an older release of ICU. I started on this for 1.4 and later 1.6 and then 1.8 and again 1.8 and it looks like you have fix the slow build times. However uprv_getDefaultLocaleID is only used in uloc_setDefault which is invoked with a NULL parameter by uloc_getDefault if the default locale has not been initialized. Thus it should only be invoked once per ICU execution. If you want to keep locmap.cpp maybe you could rename it to winutil.cpp. Then it would stand out as not being a part of Unix builds. Carl > -----Original Message----- > From: icu...@os... > [mailto:icu...@os...]On Behalf Of Markus Scherer > Sent: Friday, July 27, 2001 4:36 PM > To: icu list > Subject: Re: Proposal: Eliminate locmap.cpp > > > "Carl W. Brown" wrote: > > Another way is to hand code the new XP LICDs for now until the > SDK updates > > are standard. > > There is little advantage one may get with this proposal, while > users of vanilla VC++ 6 header files would get into trouble. > I don't see what we could gain by chaning _some_ codes to > #defines while others - including all new ones - _must_ stay > integer constants. > > > The idea of the two level mapping creates problems. It is not > a very good > > No, it's good: It is faster than a single-level search because > you compare fewer items. > > > idea for a table that is only used once. You spend probably > 100 times more > > processing building the table than the single search uses. > > No, nothing is "built" here. It is all static const and stored in > the data segment of the library. There is zero setup cost. > > > Using hand build table to check hand built tables allows for > errors. This > > is why your lcid test program did not catch the nn LICD bug. Using this > > technique I found it easily. > > Ok, so we might look into improving a test program that is not > part of the regular build. > > > I first came across locmap.cpp developing a customized Unix > build of ICU. > > All the other modules in ICU are used on all platforms except > locmap.cpp. > > If you were consistent you should create a separate module for > the Mac and > > another for POSIX systems. This is no more than the Mac lookup > table that > > is in putil.c today. > > This is possible - we could put all these maps into locmap.cpp, > or into locmac/locwin/locunix.cpp etc. > But, why fix what's not broken? > > > I have opted to make the table very compact yet flexible. It > can be used > > for any kind of search. If you search with no sub language you will get > > Nice. > In ICU, locmap.cpp is used only to map from LCID to ICU locale ID > string. I think that there is code that attempts the reverse, but > it is not used. > George is aware of bugs in the data and will fix them, but the > structure is fine for what it is used. > > markus > _______________________________________________ > icu mailing list > ic...@os... > http://oss.software.ibm.com/developerworks/opensource/mailman/list info/icu |