      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);
    };
  
    const char* distance_unit = Params().getBool("IsMetric") ? "KM" : "MILES";
    QGridLayout* gl = new QGridLayout();
    gl->setMargin(0);
    gl->addWidget(new QLabel("ALL TIME"), 0, 0, 1, 3);
    add_stats_layouts(gl, all_, 1, distance_unit);
    gl->addWidget(new QLabel("PAST WEEK"), 6, 0, 1, 3);
    add_stats_layouts(gl, week_, 7, distance_unit);
 
</s> remove   setStyleSheet("QLabel {font-size: 48px; font-weight: 500;}");
 </s> add   metric = Params().getBool("IsMetric");
  QString distance_unit = metric ? "KM" : "MILES"; </s> remove   auto add_stats_layouts = [&](QGridLayout* gl, StatsLabels& labels, int row, const char* distance_unit) {
 </s> add   auto add_stats_layouts = [&](QGridLayout* gl, StatsLabels& labels, int row, const QString &distance_unit) { </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  </s> remove   // setup labels for each alert
  QString json = QString::fromStdString(util::read_file("../controls/lib/alerts_offroad.json"));
  QJsonObject obj = QJsonDocument::fromJson(json.toUtf8()).object();
  for (auto &k : obj.keys()) {
    QLabel *l = new QLabel(this);
    alerts[k.toStdString()] = l;
    int severity = obj[k].toObject()["severity"].toInt();

    l->setMargin(60);
    l->setWordWrap(true);
    l->setStyleSheet("background-color: " + QString(severity ? "#E22C2C" : "#292929"));
    l->setVisible(false);
    alerts_layout->addWidget(l);
  }

  alerts_layout->addStretch(1);

 </s> add 
  QGridLayout* gl = new QGridLayout(this);
      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);
    };
  
  QGridLayout* gl = new QGridLayout(this);
  QGridLayout* gl = new QGridLayout(this);
    gl->setMargin(0);
    gl->addWidget(new QLabel("ALL TIME"), 0, 0, 1, 3);
    add_stats_layouts(gl, all_, 1, distance_unit);
    gl->addWidget(new QLabel("PAST WEEK"), 6, 0, 1, 3);
    add_stats_layouts(gl, week_, 7, distance_unit);
keep keep keep keep replace 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