-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Call tolowercase only when needed #4881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📊 Tachometer Benchmark ResultsSummary⏳ Benchmarks are currently running. Results below are out of date. duration
usedJSHeapSize
Results⏳ Benchmarks are currently running. Results below are out of date. create10kduration
usedJSHeapSize
filter-listduration
usedJSHeapSize
hydrate1kduration
usedJSHeapSize
many-updatesduration
usedJSHeapSize
replace1kduration
usedJSHeapSize
run-warmup-0
run-warmup-1
run-warmup-2
run-warmup-3
run-warmup-4
run-final
text-updateduration
usedJSHeapSize
tododuration
usedJSHeapSize
update10th1kduration
usedJSHeapSize
|
|
Size Change: -88 B (-0.18%) Total Size: 47.5 kB
ℹ️ View Unchanged
|
| } else if (i === 'translate' && value === 'no') { | ||
| // Lowercase only for this specific, rare prop | ||
| value = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment doesn't make sense to me, might be a leftover from an earlier iteration? Or am I being daft (also very possible)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And good spot BTW! Dropping the regex is great
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whups, you're right, I first had toLowerCase for translate and then realised we don't need that 😅
07e7e86 to
8bbc8d9
Compare
Reduces unnecessary string ops and regex checks.
Small bundle size reduction and improved render perf in compat.