title: Laravel Queue affecting the execution time of API function
body: <p>I have an API function that stores pdf file to my <code>s3 bucket</code> and then sends email with the pdf file as an attachment.</p>
  <p>Since this is my first time, I got confused because from what I understood, jobs executes from the background, thus, it should not affect the execution time of the function.</p>
  <p>But instead, having these jobs makes the execution time almost <code>8 seconds</code>.</p>
  <p>Here's my function</p>
  <pre><code>    $is_exist = CoachingApplication::where('user_id', $userID)-&gt;first();
  
      if ($is_exist == null) {
          $application = new CoachingApplication();
          $application-&gt;user_id = $userID;
          $application-&gt;applicant_name = $applicantName;
          $application-&gt;attachment = $filename;
          $application-&gt;instrument_rate = $instrumentRate;
  
          if ($application-&gt;save()) {
              if ($filename !== 'none') {
                  StoreBucketJob::dispatch($userID, $filename, $attachment_fileArray)-&gt;delay(Carbon::now()-&gt;addSeconds(3));
              }
              SendEmailJob::dispatch($userID, $userName, $userSlug, $userEmail, $filename)-&gt;delay(Carbon::now()-&gt;addSeconds(3));
          }
      }
  </code></pre>
  <p>If I remove these jobs, the function's execution time is <code>469ms</code>.</p>
  <p>Any idea why these jobs affects the api's execution time?</p>