Open chiefcll opened 2 months ago
I'd definitely be open to this. Have you tried this switch yourself in your app?
I haven't tried changing it yet. I assume using normal string comparison is much faster - but some users may need localeCompare. Probably need an option to use one or the other based on if the user needs it - but I assume large percentage of users don't need localeCompare for routing.
Describe the bug
Matching a segment is taking ~45 ms due to localeCompare. This only happens when deep linking - the base route doesn't have an issue.
Your Example Website or App
https://lightning-js.github.io/solid-demo-app/#/browse/movie
Steps to Reproduce the Bug or Issue
Load up the site with 6x slowdown in Chrome - doing the initial match for a route takes ~45ms.
Expected behavior
Much faster matching of routes. https://stackoverflow.com/questions/14677060/400x-sorting-speedup-by-switching-a-localecompareb-to-ab-1ab10 Recommend not using localeCompare
Screenshots or Videos
No response
Platform
Mac, Chrome, latest
Additional context
No response