message: Only generate mapping json when requested
  Summary: Ref T50427
  Reviewers: jakeh, vladimirm, #tensorflow, #framework_ip_review_-_any_oss_or_third-party_code_use_has_been_approved
  Maniphest Tasks: T50427
diff: @@ -1821,8 +1821,13 @@ StatusOr<std::unique_ptr<PoplarExecutableCore>> CompileEngine(
  main_graph.outputVertexGraph(stream, progs);
  }
  - const std::string map_json =
  - GetTensorMappingJson(module->name(), main_graph, resources.tensor_maps);
  + std::string map_json = "";
  + if (enable_trace_events) {
  + // Only generate the mapping json when explicitly requested as it is an
  + // expensive call.
  + map_json = GetTensorMappingJson(module->name(), main_graph,
  + resources.tensor_maps);
  + }
  try {
  Tracepoint tracepoint("PoplarEngineConstruction");
  