You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by SenthilKumar K <se...@gmail.com> on 2019/06/03 14:25:54 UTC

StringEscapeUtils Performance

Hello Experts , We have been using the String Escape Utils API to escape
JSON data. I'm observing the performance issue in this API. Total length of
String input varies between 100 to 1K. Am i using the API in right way ?
Any input to improve the performance  would be greatly appreciated.


import org.apache.commons.text.StringEscapeUtils;


StringEscapeUtils.escapeJson(data);


Library Version :

  <dependency>
     <groupId>org.apache.commons</groupId>
     <artifactId>commons-text</artifactId>
     <version>1.6</version>
  </dependency>


--Senthil

Re: StringEscapeUtils Performance

Posted by SenthilKumar K <se...@gmail.com>.
Thanks Gary. Using Visual VM is part of my plan. Before starting the
measurement wanted to check with users if anyone faced similar performance
issues with StringEscapeUtils API.

--Senthil

On Mon, Jun 3, 2019 at 8:04 PM Gary Gregory <ga...@gmail.com> wrote:

> I think you'll need to measure your use cases from VisualVM or a similar
> tool. You can then propose changes or at the very least present concrete
> data.
>
> Gary
>
> On Mon, Jun 3, 2019 at 10:26 AM SenthilKumar K <se...@gmail.com>
> wrote:
>
>> Hello Experts , We have been using the String Escape Utils API to escape
>> JSON data. I'm observing the performance issue in this API. Total length
>> of
>> String input varies between 100 to 1K. Am i using the API in right way ?
>> Any input to improve the performance  would be greatly appreciated.
>>
>>
>> import org.apache.commons.text.StringEscapeUtils;
>>
>>
>> StringEscapeUtils.escapeJson(data);
>>
>>
>> Library Version :
>>
>>   <dependency>
>>      <groupId>org.apache.commons</groupId>
>>      <artifactId>commons-text</artifactId>
>>      <version>1.6</version>
>>   </dependency>
>>
>>
>> --Senthil
>>
>

Re: StringEscapeUtils Performance

Posted by Gary Gregory <ga...@gmail.com>.
I think you'll need to measure your use cases from VisualVM or a similar
tool. You can then propose changes or at the very least present concrete
data.

Gary

On Mon, Jun 3, 2019 at 10:26 AM SenthilKumar K <se...@gmail.com>
wrote:

> Hello Experts , We have been using the String Escape Utils API to escape
> JSON data. I'm observing the performance issue in this API. Total length of
> String input varies between 100 to 1K. Am i using the API in right way ?
> Any input to improve the performance  would be greatly appreciated.
>
>
> import org.apache.commons.text.StringEscapeUtils;
>
>
> StringEscapeUtils.escapeJson(data);
>
>
> Library Version :
>
>   <dependency>
>      <groupId>org.apache.commons</groupId>
>      <artifactId>commons-text</artifactId>
>      <version>1.6</version>
>   </dependency>
>
>
> --Senthil
>