Repository navigation
Conversation
Merging this PR will degrade performance by 8.12%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | complex_relative_date |
314.1 µs | 437.6 µs | -28.22% |
| ❌ | Memory | factor_multiple_u64s[2] |
54.1 KB | 66.2 KB | -18.3% |
| ❌ | Memory | hostname_basic |
56.3 KB | 68.4 KB | -17.71% |
| ❌ | Memory | seq_custom_separator |
58.4 KB | 70.5 KB | -17.17% |
| ❌ | Memory | wc_lines_extreme_line_lengths[(100000, 200)] |
65 KB | 77.1 KB | -15.7% |
| ❌ | Memory | nl_many_lines[100000] |
66.2 KB | 78.3 KB | -15.47% |
| ❌ | Memory | unexpand_many_lines[100000] |
67 KB | 79.1 KB | -15.32% |
| ❌ | Memory | expand_custom_tabstops[50000] |
67 KB | 79.1 KB | -15.31% |
| ❌ | Memory | cut_characters_long_lines |
69 KB | 81.1 KB | -14.93% |
| ❌ | Memory | fold_custom_width[50000] |
76 KB | 88.1 KB | -13.75% |
| ❌ | Memory | split_numeric_suffix |
80.5 KB | 92.6 KB | -13.07% |
| ❌ | Memory | df_deep_directory |
80.7 KB | 92.8 KB | -13.04% |
| ❌ | Memory | join_custom_separator |
86 KB | 98.1 KB | -12.34% |
| ❌ | Memory | cksum_multiple_files |
91.2 KB | 103.3 KB | -11.72% |
| ❌ | Memory | tee_stdin_file[10000000] |
69.7 KB | 78.7 KB | -11.48% |
| ❌ | Memory | rm_recursive_tree |
98 KB | 110.1 KB | -11% |
| ❌ | Simulation | hostname_basic |
332.7 µs | 371.8 µs | -10.52% |
| ❌ | Memory | timer_expiry_latency[0.001] |
79.9 KB | 88.9 KB | -10.17% |
| ❌ | Memory | cat_default[10000] |
81.4 KB | 89.9 KB | -9.49% |
| ❌ | Simulation | tee_stdin_file[10000000] |
367.9 µs | 404.5 µs | -9.06% |
| ... | ... | ... | ... | ... | ... |
ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing RenjiSann:l10n-uioerror (7782e8b) with main (5ec266b)
Footnotes
-
46 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
|
Well, that's some nasty performance regression |
|
GNU testsuite comparison: |
|
For some reason I don't get, |
c178883 to
ea01d67
Compare
| error-invalid-argument = Argument invalide | ||
| error-is-a-directory = { $file }: Est un répertoire | ||
|
|
||
| uio-err-not-found = Aucun fichier ou répertoire de ce type |
There was a problem hiding this comment.
just don't put the id then
| print_tx.send(Err(std::io::Error::new( | ||
| std::io::ErrorKind::InvalidData, | ||
| print_tx.send(Err(std::io::Error::other( | ||
| "Too many levels of symbolic links", |
| // and we want to strip the "(os error X)" suffix. | ||
| match self.inner.kind() { | ||
| NotFound => "No such file or directory", | ||
| PermissionDenied => "Permission denied", |
There was a problem hiding this comment.
Not sure I get this one 😅
7f5e6bf to
fdbdd4a
Compare
|
I introduced a new dev dependency I'm considering splitting the work into 2 separate PRs, wdyt @sylvestre ? |
|
i am fine in this pr, i am more worried about the perf impact :) |
fdbdd4a to
fab1573
Compare
Yep, as do I. not sure how we can avoid it though. Do you happen to know why fluent_bundle can't be passed between threads ? |
fab1573 to
7782e8b
Compare
| @@ -193,17 +122,15 @@ thread_local! { | |||
| ) | |||
| )] | |||
| static LOCALIZER: OnceLock<Localizer> = const { OnceLock::new() }; | |||
| /// Built on the first lookup that misses every ordinary bundle; `None` | |||
| /// when there are no error strings to be found at all. | |||
| // Avoid duplicated and high-cost localizer setup | |||
| #[cfg_attr( | |||
There was a problem hiding this comment.
we allow missing_const_for_thread_local at crate level now: ab3e572
By the way, #15602 will run tests in separate processes. So measurements will be more accurate once that has been merged. |
| TimedOut => translate!("uio-err-timed-out"), | ||
| WriteZero => translate!("uio-err-write-zero"), | ||
| Interrupted => translate!("uio-err-interrupted"), | ||
| UnexpectedEof => translate!("uio-err-unexpected-eof"), |
There was a problem hiding this comment.
please add a test showing a translated UIoError (fr-FR) too
| } | ||
| // These are errors that come directly from the OS. | ||
| // We want to normalize their messages across systems, | ||
| // and we want to strip the "(os error X)" suffix. |
There was a problem hiding this comment.
about my "oups": without the raw_os_error() check, custom messages are lost, e.g. csplit csplit-stream-not-utf8 now prints "Invalid data", mv mv-error-dangling-symlink prints "No such file or directory".
could you please keep the check (the comment above is stale too) and add a test for it?
|
|
||
| fn get_message_internal(id: &str, args: Option<FluentArgs>) -> String { | ||
| // Disable lazy setup evaluation for tests. | ||
| #[cfg(not(test))] |
There was a problem hiding this comment.
so the lazy setup is never tested? please add a test for it (a spawned thread getting translated messages)
|
|
||
| /// Called by precaution when trying to get a message, in case we are in | ||
| /// a separate thread and the thread_local LOCALIZER is not created yet. | ||
| pub fn lazy_thread_setup_localization() -> Result<(), LocalizationError> { |
| fn test_create_bundle_success() { | ||
| let temp_dir = create_test_locales_dir(); | ||
| let locale = LanguageIdentifier::from_str("en-US").unwrap(); | ||
| rusty_fork_test! { |
There was a problem hiding this comment.
one rusty_fork_test! block can hold all the tests, no? and the thread::spawn inside becomes useless
| checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" | ||
| dependencies = [ | ||
| "windows-sys 0.60.2", | ||
| "windows-sys 0.61.2", |
There was a problem hiding this comment.
please drop the windows-sys bumps, unrelated to this pr
This is an attempt to fix #11451