message: Optimise lookup of API event from action
diff: @@ -1166,10 +1166,13 @@ private:
  if(name.isEmpty())
  {
  - for(const APIEvent &e : action->events)
  - {
  - if(e.eventId == eid)
  + auto eidit = std::lower_bound(action->events.begin(), action->events.end(), eid,
  + [](const APIEvent &e, uint32_t eid) { return e.eventId < eid; });
  +
  + if(eidit != action->events.end() && eidit->eventId == eid)
  {
  + const APIEvent &e = *eidit;
  +
  const SDChunk *chunk = m_Ctx.GetStructuredFile().chunks[e.chunkIndex];
  name = chunk->name;
  @@ -1212,9 +1215,6 @@ private:
  }
  name += QLatin1Char(')');
  -
  - break;
  - }
  }
  if(name.isEmpty())
  