-
Notifications
You must be signed in to change notification settings - Fork 47
Implement optimized method #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Added an optimized version of FillPlaceHolder that processes all replacements in a single pass, improving performance for placeholder replacements.
|
I think using |
|
@scgm0
|
|
@tehtelev Can you test this again? |
|
@scgm0 Your version (FillPlaceHolderOptimizedV3): 1201 ms. |
|
@scgm0 |
Can you identify under what data the results are problematic? |
|
figurehead.json
|
Do you have time to debug? |
|
@tehtelev Previously, I accidentally wrote
|
|
@scgm0 All tests passed successfully. Runtime: 1373 ms. ^_^ |
|
I feel a bit obsessed with this, but now |



A more efficient FillPlaceHolder implementation has been proposed (you can replace the original with it if you prefer). The main problem is using Regex with multiple calls from different locations. This implementation handles all replacements in a single pass. This manipulation is much simpler and faster.
Also used in PR here.