[ 
https://issues.apache.org/jira/browse/TEXT-153?focusedWorklogId=207487&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-207487
 ]

ASF GitHub Bot logged work on TEXT-153:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 04/Mar/19 22:47
            Start Date: 04/Mar/19 22:47
    Worklog Time Spent: 10m 
      Work Description: garydgregory commented on issue #108: TEXT-153: Make 
prefixSet a BitSet.
URL: https://github.com/apache/commons-text/pull/108#issuecomment-469453204
 
 
   That makes sense. The drawback is the confusion over dev and due-to. It
   seems that in relation to github, dev should be the committer, an Apache
   Committer and due-to the GitHub PR Author.
   
   Gary
   
   On Mon, Mar 4, 2019 at 5:26 PM Bruno P. Kinoshita <[email protected]>
   wrote:
   
   > @garydgregory <https://github.com/garydgregory> should we update
   > CONTRIBUTING.md and/or the contributing section in our README adding a
   > mention to the changes.xml file? (probably in the release plugin that
   > generates those files)
   >
   > —
   > You are receiving this because you were mentioned.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/commons-text/pull/108#issuecomment-469447285>,
   > or mute the thread
   > 
<https://github.com/notifications/unsubscribe-auth/ABIfN99IsEFmAmNP87Smdj5fQlnQiGVfks5vTZ2ugaJpZM4bdNDb>
   > .
   >
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 207487)
    Time Spent: 50m  (was: 40m)

> LookupTranslator performance optimization
> -----------------------------------------
>
>                 Key: TEXT-153
>                 URL: https://issues.apache.org/jira/browse/TEXT-153
>             Project: Commons Text
>          Issue Type: Improvement
>    Affects Versions: 1.0
>            Reporter: Amir Hadadi
>            Priority: Minor
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> When using Java Mission Control to profile an application that uses 
> StringEscapeUtils::escapeEcmaScript, I noticed that a lot of time is spent in 
> LookupTranslator::translate at the prefixSet::contains check.
> I suggest taking advantage of the fact that prefixSet contains only 
> characters, and replace it with a BitSet.
> I did some benchmarking and translate for the non escaped case is 4-5X faster 
> when replacing the HashSet with a BitSet.
> BitSet Memory consumption for characters is capped at 8KB, and depends on the 
> maximal prefix character. For example for ECMA script the max escaped prefix 
> character is "\" which has unicode code 92 so the BitSet uses a long array of 
> length 2 to represent all the needed characters.
>  
> Link to pull request: https://github.com/apache/commons-text/pull/108
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to