Re: [PR] Increase performance of CodepointsUtil.java by 5x [poi]

2024-02-29 Thread via GitHub
mirraj2 commented on PR #582: URL: https://github.com/apache/poi/pull/582#issuecomment-1972150412 thanks @pjfanning -- 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 unsu

Re: [PR] Increase performance of CodepointsUtil.java by 5x [poi]

2024-02-03 Thread via GitHub
pjfanning commented on PR #582: URL: https://github.com/apache/poi/pull/582#issuecomment-1925455512 I added this with https://github.com/apache/poi/commit/2469b89ee62f1d8647d0e2a445f81ce347ced3f5 - thanks -- This is an automated message from the Apache Git Service. To respond to the mess

Re: [PR] Increase performance of CodepointsUtil.java by 5x [poi]

2024-02-03 Thread via GitHub
asfgit closed pull request #582: Increase performance of CodepointsUtil.java by 5x URL: https://github.com/apache/poi/pull/582 -- 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.

Re: [PR] Increase performance of CodepointsUtil.java by 5x [poi]

2024-02-03 Thread via GitHub
xzel23 commented on PR #582: URL: https://github.com/apache/poi/pull/582#issuecomment-1925451301 Sorry, I didn't see that the primitiveIterator already handles codepoints correctly. I removed the comments regarding codepoints. So you just need to change the Character.toString(). -- This

Re: [PR] Increase performance of CodepointsUtil.java by 5x [poi]

2024-02-03 Thread via GitHub
xzel23 commented on PR #582: URL: https://github.com/apache/poi/pull/582#issuecomment-1925449684 This demonstrates the problem: ``` jshell> "𠜎𠜱𠝹𠱓𠱸𠲖𠳏!".toCharArray() $8 ==> char[15] { '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '!' } jshell> "𠜎𠜱𠝹𠱓𠱸𠲖𠳏!

Re: [PR] Increase performance of CodepointsUtil.java by 5x [poi]

2024-02-03 Thread via GitHub
pjfanning commented on PR #582: URL: https://github.com/apache/poi/pull/582#issuecomment-1925449558 https://github.com/apache/poi/commit/e45579801975c995bd846f41f9318cc11b56ffb3 removes 1 of the 2 remaining uses of iteratorFor. -- This is an automated message from the Apache Git Service

Re: [PR] Increase performance of CodepointsUtil.java by 5x [poi]

2024-02-03 Thread via GitHub
pjfanning commented on code in PR #582: URL: https://github.com/apache/poi/pull/582#discussion_r1477123234 ## poi/src/main/java/org/apache/poi/util/CodepointsUtil.java: ## @@ -26,13 +26,21 @@ public class CodepointsUtil { /** * @param text to iterate over * @ret

Re: [PR] Increase performance of CodepointsUtil.java by 5x [poi]

2024-02-03 Thread via GitHub
pjfanning commented on code in PR #582: URL: https://github.com/apache/poi/pull/582#discussion_r1477123146 ## poi/src/main/java/org/apache/poi/util/CodepointsUtil.java: ## @@ -26,13 +26,21 @@ public class CodepointsUtil { /** * @param text to iterate over * @ret

Re: [PR] Increase performance of CodepointsUtil.java by 5x [poi]

2024-02-03 Thread via GitHub
xzel23 commented on PR #582: URL: https://github.com/apache/poi/pull/582#issuecomment-1925446845 Another thing is that the new code iterates over chars, not the codepoints. That does not work for some CLK characters, so you need to revert the second commit. -- This is an automated messag

Re: [PR] Increase performance of CodepointsUtil.java by 5x [poi]

2024-02-03 Thread via GitHub
pjfanning commented on PR #582: URL: https://github.com/apache/poi/pull/582#issuecomment-1925446135 Do you have you know what code is calling this iteratorFor method? Most POI code already uses the primitiveIterator method instead. -- This is an automated message from the Apache Git Servi

Re: [PR] Increase performance of CodepointsUtil.java by 5x [poi]

2024-02-03 Thread via GitHub
xzel23 commented on PR #582: URL: https://github.com/apache/poi/pull/582#issuecomment-1925445097 I think another (and maybe the main) reason might be the two step conversion and the creating of both a new character array and a new string instance creation in every step in the old code where