  std::deque<HistoryLogModel::Message> HistoryLogModel::fetchData(uint64_t from_time, uint64_t min_time) {
    auto events = can->events();
    if (dynamic_mode) {
      auto first = std::upper_bound(events->rbegin(), events->rend(), from_time, [=](uint64_t ts, auto &e) { return e->mono_time < ts; });
      auto msgs = fetchData(first, events->rend(), min_time);
      if (update_colors && min_time > 0) {
 
</s> remove     auto it = std::upper_bound(events->rbegin(), events->rend(), from_time, [=](uint64_t ts, auto &e) {
      return e->mono_time < ts;
    });
    return fetchData(it, events->rend(), min_time);
 </s> add     auto first = std::upper_bound(events->rbegin(), events->rend(), from_time, [=](uint64_t ts, auto &e) { return e->mono_time < ts; });
    auto msgs = fetchData(first, events->rend(), min_time);
    if (update_colors && min_time > 0) {
      for (auto it = msgs.rbegin(); it != msgs.rend(); ++it) {
        it->colors = hex_colors.compute(it->data, it->mono_time / (double)1e9, freq);
      }
    }
    return msgs; </s> remove     auto it = std::upper_bound(events->begin(), events->end(), from_time, [=](uint64_t ts, auto &e) {
      return ts < e->mono_time;
    });
    return fetchData(it, events->end(), 0);
 </s> add     auto first = std::upper_bound(events->begin(), events->end(), from_time, [=](uint64_t ts, auto &e) { return ts < e->mono_time; });
    auto msgs = fetchData(first, events->end(), 0);
    if (update_colors) {
      for (auto it = msgs.rbegin(); it != msgs.rend(); ++it) {
        it->colors = hex_colors.compute(it->data, it->mono_time / (double)1e9, freq);
      }
    }
    return msgs; </s> remove void HistoryLogModel::updateColors() {
  if (!display_signals_mode || sigs.empty()) {
    const auto freq = can->lastMessage(msg_id).freq;
    if (dynamic_mode) {
      for (auto it = messages.rbegin(); it != messages.rend(); ++it) {
        it->colors = hex_colors.compute(it->data, it->mono_time / (double)1e9, freq);
      }
    } else {
      for (auto it = messages.begin(); it != messages.end(); ++it) {
        it->colors = hex_colors.compute(it->data, it->mono_time / (double)1e9, freq);
      }
    }
  }
}

 </s> add  </s> remove       if (!dynamic_mode) {
        updateColors();
      }
 </s> add  </s> remove       updateColors();
 </s> add 
  const auto freq = can->lastMessage(msg_id).freq;
  const bool update_colors = !display_signals_mode || sigs.empty();

  std::deque<HistoryLogModel::Message> HistoryLogModel::fetchData(uint64_t from_time, uint64_t min_time) {
    auto events = can->events();
  const auto freq = can->lastMessage(msg_id).freq;
  const bool update_colors = !display_signals_mode || sigs.empty();

    if (dynamic_mode) {
      auto first = std::upper_bound(events->rbegin(), events->rend(), from_time, [=](uint64_t ts, auto &e) { return e->mono_time < ts; });
      auto msgs = fetchData(first, events->rend(), min_time);
      if (update_colors && min_time > 0) {
keep add keep keep keep keep
 cabana: only update the colors of newly fetched messages in historylog (#27144)

only update new msgs color 
tools/cabana/historylog.cc