Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-6461

[classlib][nio_char]Remove alias cache from Charset

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.0M14
    • 5.0M14
    • None
    • None
    • Patch Available

    Description

      At present, when a charset is loaded by a charset name, Charset class will cache all alias of that charset. However it is not a good design because harmony use built-in charset provider and third party providers. We can not ensure one alias only belongs to a unique charset which provided by built-in or 3rd providers. Actually now harmony use built-in and icu provider has already countered such problems with this design. Below charset alias belong to more than one charset:
      TIS-620,
      windows-1258,
      cp856,
      cp922
      Now Charset only solve this issue with hard code. I think the correct way to deal with this situation is that when Charset load a charset with a charset name, it should only cache this charset name and the canonical name of the charset, rather than cache all alias of that charset. Follow this way the alias conflict will be solved and there is no need of any hard code anymore.
      I have test this patch for many common benchmarks like specjvm2008, specjbb2005, volano and dacapo. It shows there is no performance regression for this design change. So please someone verify this patch. Thanks a lot!

      Attachments

        1. HY-6461.diff
          3 kB
          deven you

        Activity

          People

            regis_xu Regis Xu
            deven deven you
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 96h
                96h
                Remaining:
                Remaining Estimate - 96h
                96h
                Logged:
                Time Spent - Not Specified
                Not Specified