THausherr commented on PR #107: URL: https://github.com/apache/pdfbox/pull/107#issuecomment-1449313244
> 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}")). Thank you, I implemented the first two suggestions but not the last, because it makes the code harder to understand, we'd have something like `w4pattern.matcher(featureTags[i]).matches()`, and this code part is only used for corrupt fonts so it doesn't matter much IMHO. -- 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-unsubscr...@pdfbox.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org