You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "valerybokov (via GitHub)" <gi...@apache.org> on 2023/02/28 20:16:58 UTC

[GitHub] [pdfbox] valerybokov commented on pull request #107: potential memory leaks and small performance improvements

valerybokov commented on PR #107:
URL: https://github.com/apache/pdfbox/pull/107#issuecomment-1448831195

   Hi, @THausherr !
   Several possible performance improvements. Inside GlyphSubstitutionTable.readScriptList method we create a scriptTables variable. Then we fill it in loop. We then use it in the next loop. We can do this in the first loop and remove this variable.
   The same about the langSysRecords variable in the readScriptTable method.
   You able to instantiate a regular exprestion one time to not do it for each iteration in readFeatureList method (Pattern pattern = Pattern.compile("\\w{4}")).
   


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org