  
  DriveStats::DriveStats(QWidget* parent) : QWidget(parent) {
    setStyleSheet("QLabel {font-size: 48px; font-weight: 500;}");
  
    auto add_stats_layouts = [&](QGridLayout* gl, StatsLabels& labels, int row, const char* distance_unit) {
      gl->addLayout(build_stat_layout(&labels.routes, "DRIVES"), row, 0, 3, 1);
      gl->addLayout(build_stat_layout(&labels.distance, distance_unit), row, 1, 3, 1);
      gl->addLayout(build_stat_layout(&labels.hours, "HOURS"), row, 2, 3, 1);
    };
  
 
</s> remove   setStyleSheet("QLabel {font-size: 48px; font-weight: 500;}");
 </s> add   metric = Params().getBool("IsMetric");
  QString distance_unit = metric ? "KM" : "MILES"; </s> remove   const char* distance_unit = Params().getBool("IsMetric") ? "KM" : "MILES";
  QGridLayout* gl = new QGridLayout();
 </s> add   QGridLayout* gl = new QGridLayout(this); </s> remove   QVBoxLayout *layout = new QVBoxLayout();
 </s> add   QVBoxLayout *layout = new QVBoxLayout; </s> remove   QVBoxLayout* vlayout = new QVBoxLayout(this);
  vlayout->addLayout(gl);

  // TODO: do we really need to update this frequently?
 </s> add  </s> remove   bool metric = Params().getBool("IsMetric");
 </s> add 
  auto add_stats_layouts = [&](QGridLayout* gl, StatsLabels& labels, int row, const QString &distance_unit) {
  
  DriveStats::DriveStats(QWidget* parent) : QWidget(parent) {
    setStyleSheet("QLabel {font-size: 48px; font-weight: 500;}");
  
  auto add_stats_layouts = [&](QGridLayout* gl, StatsLabels& labels, int row, const QString &distance_unit) {
      gl->addLayout(build_stat_layout(&labels.routes, "DRIVES"), row, 0, 3, 1);
      gl->addLayout(build_stat_layout(&labels.distance, distance_unit), row, 1, 3, 1);
      gl->addLayout(build_stat_layout(&labels.hours, "HOURS"), row, 2, 3, 1);
    };
  
keep keep keep keep replace keep keep keep keep keep
 UI: fast startup (#20781)

* faster startup

* faster

* cleanup

Co-authored-by: Comma Device <device@comma.ai> 
selfdrive/ui/qt/widgets/drive_stats.cc