Hi Gary,

Here it is: https://github.com/apache/commons-text/pull/387

Thank you!

On 2022/11/17 12:53:02 Gary Gregory wrote:
> Hello Pavel,
>
> Feel free to create a PR on GitHub.
>
> Gary
>
> On Thu, Nov 17, 2022, 07:38 Pavel Belousov
> <pa...@booking.com.invalid> wrote:
>
> > Hi,
> >
> > After the upgrade of the `commons-text` library from 1.8 to 1.10 we
faced a
> > higher number of garbage collections and higher times of garbage
> > collection. For now we rolled back to 1.8 but as I had some
vulnerabilities
> > we do want to upgrade.
> >
> > We are actively using the `TextStringBuilder` class, so I've briefly
looked
> > at the changes there. One change looks suspicious - hashCode method
change
> > in following PR https://github.com/apache/commons-text/pull/281.
> > As I understand this correctly for now you are creating a new String
> > instance every time when Java calls `hashCode` method.
> >
> > I implemented a simple loop that calls hashCode 100M times, turned on
> > verbose GC (-verbose:gc -XX:+PrintGCDetails) and I can confirm that with
> > the new implementation GC runs 55 times instead of 2.
> >
> > As I cannot sign up for your jira, could you please help me create the
> > ticket and if possible probably you could rollback the implementation to
> > that was in 1.8 version?
> >
> > Thank you in advance!
> > --
> > Pavel Belousov
> > Senior Software Engineer
> > [image: Booking.com] <https://www.booking.com/>
> > Making it easier for everyone
> > to experience the world.
> >
>

Reply via email to