commons-vfs icon indicating copy to clipboard operation
commons-vfs copied to clipboard

Simplify UriParser

Open raboof opened this issue 8 months ago • 0 comments

The reverts https://github.com/apache/commons-vfs/pull/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 https://github.com/apache/commons-vfs/pull/543 and https://github.com/apache/commons-vfs/pull/555. It includes the testcases from https://github.com/apache/commons-vfs/pull/543, adapted to the behaviour before https://github.com/apache/commons-vfs/pull/396.

This reverts commit https://github.com/apache/commons-vfs/commit/cb45c9453669eb2570f582f491cb0e06b0e63466. This reverts commit https://github.com/apache/commons-vfs/commit/5399c766287a06ce002beaed89fa8af5461e15d0.

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 avatar Jun 26 '24 13:06 raboof