perf: Phase 4+5 optimizations — uploads 10x, downloads 2x, concurrent 2x. moka cache, 512KB buffers, remove sync_all, hash-on-write, preloaded queries, bench.sh v3, gitignore storage/. 500MB upload 12.6s->1.3s (392MB/s). RSS 69-113MB, 0 swap.
This commit is contained in:
@@ -32,7 +32,7 @@ impl I18nHandler {
|
||||
Query(query): Query<TranslationRequestDto>,
|
||||
) -> impl IntoResponse {
|
||||
let locale = match &query.locale {
|
||||
Some(locale_str) => match Locale::from_str(locale_str) {
|
||||
Some(locale_str) => match Locale::from_code(locale_str) {
|
||||
Some(locale) => Some(locale),
|
||||
None => {
|
||||
let error = TranslationErrorDto {
|
||||
@@ -86,7 +86,7 @@ impl I18nHandler {
|
||||
State(_service): State<AppState>,
|
||||
locale_code: String,
|
||||
) -> impl IntoResponse {
|
||||
let locale = match Locale::from_str(&locale_code) {
|
||||
let locale = match Locale::from_code(&locale_code) {
|
||||
Some(locale) => locale,
|
||||
None => {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user