ce280211c5b7
skip zxcvbn strength check for passwords 50+ chars to eliminate UI lag on long password generation (v5.1.4)
- time
- 2026-09-05 16:09 UTC · 1 month ago
- machine
- koh2
- agent
- glm-5.2
- session
- password generator lag fix
- parent
- 40b81cb029a0
↓ peach-browser-ce280211.tar.gzatlas at this save
files changed1 file
src/popup/views/Add.tsx+5 −0src/popup/views/Add.tsx+5 −0
@@ -155,6 +155,11 @@155155 createEffect(async () => {156156 const pwd = password();157157 if (pwd.length < 4) { setPasswordStrength(null); return; }158+ // zxcvbn does full dictionary + spatial + repeat analysis across every159+ // character, so a 100+ char password blocks the main thread for hundreds160+ // of ms per slider tick. Any 50+ char password is trivially score 4 —161+ // skip the analysis and keep the slider responsive.162+ if (pwd.length >= 50) { setPasswordStrength(4); return; }158163 try {159164 if (!zxcvbnFn()) {160165 // Replaces the unmaintained `zxcvbn` package (LV-8; see Lock.tsx).