Performance: Email verification
MEDIUM IMPACT
Email verification affects page load speed indirectly by adding server-side processing and user interaction delays during account creation and login flows.
public function register(Request $request) {
$user = User::create($request->all());
dispatch(new SendVerificationEmailJob($user));
return redirect('/login')->with('message', 'Check your email for verification link.');
}public function register(Request $request) {
$user = User::create($request->all());
Mail::to($user->email)->send(new VerifyEmail($user));
return redirect('/login')->with('message', 'Check your email for verification link.');
}| Pattern | Server Processing | Network Delay | User Wait Time | Verdict |
|---|---|---|---|---|
| Synchronous email sending | High (blocks request) | High (wait for mail server) | High (delayed response) | [X] Bad |
| Queued email sending | Low (non-blocking) | Medium (background job) | Low (fast response) | [OK] Good |