Skip to content
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

Simplify UriParser #558

Merged
merged 2 commits into from
Jul 27, 2024

Conversation

raboof
Copy link
Member

@raboof raboof commented Jun 26, 2024

The reverts #396 and related
changes and implements the same in a simpler way by replacing the
encoded characters already in fixSeparators.

This approach has a slightly higher risk at breaking existing behaviour,
but a lower risk of remaining problems in this part of the codebase. All
testcases still succeed.

This PR is intended to replace #543 and #555. It includes the testcases
from #543, adapted to the behaviour before #396.

This reverts commit cb45c94.
This reverts commit 5399c76.

This seems only slightly (<8%) slower than #547 , which might be acceptable as it's not obvious this is a bottleneck:

2290973,673 ±(99.9%) 55810,967 ops/s [Average]
2123414,134 ±(99.9%) 48374,989 ops/s [Average]

Should probably add some more tests exercising the problems that remain after the fixes from #543

@raboof raboof force-pushed the simplify-UriParser-with-rollback branch from 6d529ba to 93e50cc Compare June 26, 2024 13:35
commons-vfs2/pom.xml Outdated Show resolved Hide resolved
@raboof raboof force-pushed the simplify-UriParser-with-rollback branch from 93e50cc to 0619860 Compare July 6, 2024 19:29
@raboof raboof marked this pull request as ready for review July 6, 2024 19:30
@raboof raboof mentioned this pull request Jul 6, 2024
@garydgregory
Copy link
Member

I'd be OK to merge. Anyone else?

@japplis
Copy link
Contributor

japplis commented Jul 22, 2024

I also think it's OK to merge.
Small remark StringBuilder#deleteCharAt could have been used at line 533 & 568 of UriParser.

@garydgregory
Copy link
Member

@japplis I'm more concerned about the semantics than implementation details at this point.

raboof and others added 2 commits July 25, 2024 15:50
The reverts apache#396 and related
changes and implements the same in a simpler way by replacing the
encoded characters already in `fixSeparators`.

This approach has a slightly higher risk at breaking existing behaviour,
but a lower risk of remaining problems in this part of the codebase. All
testcases still succeed.

This PR is intended to replace apache#543 and apache#555. It includes the testcases
from apache#543, adapted to the behaviour before apache#396.

This reverts commit cb45c94.
This reverts commit 5399c76.

Co-Authored-By: Anthony Goubard <[email protected]>
@raboof raboof force-pushed the simplify-UriParser-with-rollback branch from 0619860 to 38a8976 Compare July 25, 2024 13:51
@garydgregory
Copy link
Member

@raboof
Good to merge?

@raboof
Copy link
Member Author

raboof commented Jul 26, 2024

Yes: I just fixed the merge conflict with 95ddecd and switched to StringBuilder#deleteCharAt for the two instances @japplis mentioned.

@garydgregory garydgregory merged commit 83d815a into apache:master Jul 27, 2024
17 of 23 checks passed
garydgregory added a commit that referenced this pull request Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants