Peculiar fruits in the JDK

Ulf Zibis Ulf.Zibis at CoSoCo.de
Mon Jun 30 17:07:11 UTC 2008


Hi Sherman,

I had a closer look to your code. Thanks for your hints. Looks interesting.
Also I see some chances for optimization, but more exactly ...later.

Can you tell me something about memory consuming in the current Sun JVM?
How much bytes do byte arrays consume per byte?
... or in other words: is it less memory-consuming using byte arrays 
than int arrays, if these are large?
Same question about short and char arrays?

Thanks for a short answer.

-Ulf



Am 27.06.2008 18:52, Xueming Shen schrieb:
> Ulf, my apology for the belated response, I have been kept buzy in 
> something else
> the last couple days and don't have time to dig into my "old" 
> workspace to pick the
> files. Will do it next week or so...
>
> But in fact the first piece, or say the most import block, of my 
> idea/plan has been
> already putback intot the JDK7 workspace with my fix for Japanese 
> JIS0213 work.
> The JIS0213 charset is implemented by using the "new idea", instead of 
> embedding
> the c2b/b2c mapping table into huge static String object into the 
> class file, the impl
> generates a binary mapping data file from a text based b2c mapping 
> file during the
> build-time, then initialize the b2c and c2bIndex/Table from this data 
> file during its
> init-time...
>
> take a look at the newly added sun.nio.cs.CharsetMapping.java and the 
> stuff
> under make/tool/Charsetmap...
>
> I'm in hurry, send you more later...
>
> sherman
>
>
> Ulf Zibis wrote:
>> Hi Sherman,
>>
>> I am waiting for an answer from you. I myself only answered to the 
>> list 
>> http://mail.openjdk.java.net/pipermail/core-libs-dev/2008-June/thread.html#511 
>>
>>
>> Don't you read the list regularly?
>>
>> Regards,
>> Ulf
>>
>>
>> Am 24.06.2008 17:58, Xueming Shen schrieb:
>>> Ulf Zibis wrote:
>>>>>
>>>>> Btw,  we are not going to do anything for the sun.io.XYZ classes, 
>>>>> except removing them. I had once
>>>>> removed them from the J2SE but had to put them back for some 
>>>>> reasons, but we are absolutely not
>>>>> going to do anything for that package. I've already eliminatred 
>>>>> any use of that package in J2SE in
>>>>> JDK6.
>>>> How did you eliminate the dependencies? E.g.: 
>>>> https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/milestone1/solaris/classes/sun/awt/motif/X11JIS0201.java?rev=201&view=markup 
>>>>
>>>> I see, my work on sun.io was for the scrapheap. :-(
>>>>
>>>
>>> If you have the source code for 5.x, you would find those X11 
>>> converters were sun.io based, I rewrote
>>> all of them in JDK6 and modified all the places in awt/font to use 
>>> the java.nio.charset interface..
>>> fortunately I was the original font/motif guy who wrote them in the 
>>> first place, so not too difficult:-)
>>>
>>> I did the same thing for all sun.io.XYZConverter usages to use the 
>>> java.nio.charset interface in J2SE
>>> workspace then actually removed the J2SE in JDK6 before beta, but 
>>> had to put them back because
>>> BIG licensee insisted they have their JDBC bridge drivers still 
>>> using sun.io and don't want to migrate.
>>>
>>> Yes, don't try to improve anything in sun.io package, our currently 
>>> policy is to keep it there but don't
>>> do anything. That said, in order to rewrite the sun.nio.cs/ext 
>>> package we might have to touch this
>>> package again, one of the ideas is to write a adaptor class to 
>>> bridge the sun.io.Converter to sun.nio.cs
>>> implementation, so we can eliminate all those CharToByte/ByteToChar 
>>> implementation, I have a
>>> draft implementation in one of my ws, but have not fully tested, 
>>> will dig it out later.
>>>
>>>> very much thank for appreciating my work,
>>>>
>>>
>>> Really appreciate your work. The charset implementation work 
>>> currently is not my priority
>>> simply because I lost my main codereviewer Martin (though he is 
>>> still interested in this area
>>> after moving on to Google, I'm not so sure how much he can continue 
>>> spend on this), so it
>>> would be easy to work on my other interesting areas. But seems like 
>>> we now have a contributor
>>> who is very experienced and interested in charset:-)  we should give 
>>> it a try. I will send
>>> you some classes I was working on to share my thoughts/ideas later. 
>>> But I would "warn" you
>>> that all the changes might not make into JDK7, there are sill some 
>>> debates internally that whether
>>> or not we should spend our resource (very limited) on something that 
>>> works (don't break it if it
>>> works:-))
>>>
>>> Sherman
>>>
>>>
>>>
>>>
>>
>
>
>




More information about the core-libs-dev mailing list