JDK-8268622 - Performance issues in javac `Name` class
Archie Cobbs
archie.cobbs at gmail.com
Fri Mar 3 14:23:09 UTC 2023
On Thu, Mar 2, 2023 at 5:32 PM Archie Cobbs <archie.cobbs at gmail.com> wrote:
> On Tue, Feb 28, 2023 at 9:30 AM Archie Cobbs <archie.cobbs at gmail.com>
> wrote:
>
>> Jon and I have been discussing JDK-8268622
>> <https://bugs.openjdk.org/browse/JDK-8268622> via JBS comments, but it's
>> better off being discussed on compiler-dev, so we're moving the discussion
>> here...
>>
>
> Jon (and anyone else interested),
>
> Please take a look at https://github.com/openjdk/jdk/pull/12843 and let
> me know what you think.
>
Also here's a "sketch" of a refactoring along the lines of JDK-8269957
<https://bugs.openjdk.org/browse/JDK-8269957> "facilitate alternate impls
of NameTable and Name".
https://github.com/openjdk/jdk/compare/master...archiecobbs:jdk:JDK-8269957
Let me know if this is the kind of thing you had in mind. Note, this
includes the above patch as well.
Overview of changes...
- Remove any byte-oriented methods from Name and NameTable API's, except
for those that "import" or "export" as UTF-8.
- Refactor SharedNameTable & UnsharedNameTable to have a new common
superclass Utf8NameTable
- Fix bug in PoolReader, in that it was not doing any validation when
decoding "Modified UTF-8". For example, this bug could result in duplicate
Names if a classfile contained the same name encoded two different ways.
- Eliminated an unnecessary extra array allocation in Convert.utf2chars()
- Rename Name.lastIndexOf() -> Name.lastIndexOfAscii() for safety
-Archie
--
Archie L. Cobbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/compiler-dev/attachments/20230303/e940c8a1/attachment.htm>
More information about the compiler-dev
mailing list