Skip to content

Comments

Omit lowercasing components and paths, and opt for case insensitive comparisons instead#749

Draft
Joannis wants to merge 2 commits intomainfrom
jo/omit-copies-lowercased
Draft

Omit lowercasing components and paths, and opt for case insensitive comparisons instead#749
Joannis wants to merge 2 commits intomainfrom
jo/omit-copies-lowercased

Conversation

@Joannis
Copy link
Member

@Joannis Joannis commented Nov 9, 2025

No description provided.

@Joannis Joannis force-pushed the jo/omit-copies-lowercased branch from 8d609ed to 60bff89 Compare November 9, 2025 09:31
@github-actions
Copy link

github-actions bot commented Nov 9, 2025

✅ Pull request no significant performance differences ✅

Summary

New baseline 'pull_request' is WITHIN the 'main' baseline thresholds.

Full Benchmark Comparison

Comparing results between 'main' and 'pull_request'

Host 'b30afe61ca49' with 4 'x86_64' processors with 15 GB memory, running:
#18~24.04.1-Ubuntu SMP Sat Jun 28 04:46:03 UTC 2025

Router

Router:Echo metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 769 769 769 769 769 769 769 1039
pull_request 768 768 768 768 768 768 768 1050
Δ -1 -1 -1 -1 -1 -1 -1 11
Improvement % 0 0 0 0 0 0 0 11

Router:GET metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 468 468 468 468 468 468 468 2905
pull_request 468 468 468 468 468 468 468 2946
Δ 0 0 0 0 0 0 0 41
Improvement % 0 0 0 0 0 0 0 41

Router:Middleware metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 373 373 373 373 373 373 373 2717
pull_request 373 373 373 373 373 373 373 2730
Δ 0 0 0 0 0 0 0 13
Improvement % 0 0 0 0 0 0 0 13

Router:PUT metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 1272 1272 1272 1272 1272 1272 1272 817
pull_request 1270 1270 1270 1270 1270 1270 1270 825
Δ -2 -2 -2 -2 -2 -2 -2 8
Improvement % 0 0 0 0 0 0 0 8

Router:Parameters metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 718 718 718 718 718 718 718 2419
pull_request 718 718 718 718 718 718 718 2442
Δ 0 0 0 0 0 0 0 23
Improvement % 0 0 0 0 0 0 0 23

RouterBuilder:Middleware metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 372 372 372 372 372 372 372 2770
pull_request 372 372 372 372 372 372 372 2764
Δ 0 0 0 0 0 0 0 -6
Improvement % 0 0 0 0 0 0 0 -6

TrieRouter:LongPaths metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 11 11 11 11 11 11 11 239
pull_request 11 11 11 11 11 11 11 232
Δ 0 0 0 0 0 0 0 -7
Improvement % 0 0 0 0 0 0 0 -7

TrieRouter:Parameters metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 19 19 19 19 19 19 19 183
pull_request 19 19 19 19 19 19 19 179
Δ 0 0 0 0 0 0 0 -4
Improvement % 0 0 0 0 0 0 0 -4

TrieRouter:Routing metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 13 13 13 13 13 13 13 233
pull_request 13 13 13 13 13 13 13 225
Δ 0 0 0 0 0 0 0 -8
Improvement % 0 0 0 0 0 0 0 -8

@Joannis Joannis force-pushed the jo/omit-copies-lowercased branch from f8ed7d7 to ec77f90 Compare November 9, 2025 09:47
@Joannis Joannis force-pushed the jo/omit-copies-lowercased branch from ec77f90 to 9da9b0a Compare November 9, 2025 09:48
@codecov
Copy link

codecov bot commented Nov 9, 2025

Codecov Report

❌ Patch coverage is 51.66667% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.42%. Comparing base (5bd2a4b) to head (9da9b0a).

Files with missing lines Patch % Lines
Sources/Hummingbird/Router/RouterPath.swift 0.00% 26 Missing ⚠️
Sources/Hummingbird/Router/Trie/Trie+resolve.swift 92.85% 2 Missing ⚠️
Sources/Hummingbird/Router/TrieRouter.swift 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #749      +/-   ##
==========================================
- Coverage   83.79%   83.42%   -0.38%     
==========================================
  Files         117      117              
  Lines        5993     6034      +41     
==========================================
+ Hits         5022     5034      +12     
- Misses        971     1000      +29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@adam-fowler
Copy link
Member

Can we add a benchmark to verify this is performance improvement, on both long and short URIs.

//
//===----------------------------------------------------------------------===//

internal import Foundation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use FoundationEssentials, caseInsensitiveCompare should be available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants