title: Spring boot page loads slow
body: <p>I have a fairly simple web application with a page for editing an entity.
  It takes about 30 seconds to load and i don't see why. The SQL-queries finish in just over a second.</p>
  
  <p>My controller method</p>
  
  <pre><code>@GetMapping(value = "/lasterapport/{id}")
  public String lasterapport(Model model, @PathVariable("id") Long id) {
      model.addAttribute("lasterapport", lasterapportRepository.getOne(id));
      model.addAttribute("brukere", brukerRepository.findAll());
      model.addAttribute("lastere", maskinRepository.findLastere());
      model.addAttribute("trucker", maskinRepository.findTrucker());
      model.addAttribute("masser", masseRepository.findAll());
      model.addAttribute("destinasjoner", destinasjonRepository.findAll());
      return "lasterapport";
  }
  </code></pre>
  
  <p>My entity (without getters and setters and constructor for readability)</p>
  
  <pre><code>@Entity
  public class Lasterapport {
  
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      private Long id;
  
      @ManyToOne
      private Bruker truckBruker;
  
      @ManyToOne
      private Bruker lasterBruker;
  
      @ManyToOne
      private Maskin truckMaskin;
  
      @ManyToOne
      private Maskin lasterMaskin;
  
      @ManyToOne
      private Masse masse;
  
      @ManyToOne
      private Destinasjon destinasjon;
  
      private Integer tonn;
      private Date tidspunkt;
      private String vifte_id;
  }
  </code></pre>
  
  <p>And my view is just a form with these select-inputs for all the different ManyToOne-relations</p>
  
  <pre><code>&lt;div class="form-group"&gt;
          &lt;label for="maskinLaster"&gt;Sjåfør laster&lt;/label&gt;
          &lt;select class="form-control" th:field="*{lasterBruker}"&gt;
                  &lt;option th:each="dropDownItem : ${brukere}"
                          th:value="${dropDownItem.id}"
                          th:text="${dropDownItem.navn}" &gt;
                  &lt;/option&gt;
          &lt;/select&gt;        
      &lt;/div&gt;
  </code></pre>
  
  <p>I'm thinking it has something to do with how Spring handles the form data? Even if the queries are fairly quick, if i dont add the attributes that provides options for select-inputs the page finish loading almost instantly.</p>