1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:37:35 +00:00

Profiler: Avoid copies / String construction when parsing profile (#7096)

Use sv literal suffix to construct StringViews at compile time,
and make sure to reference array items by const reference.
This commit is contained in:
Brian Gianforcaro 2021-05-14 08:21:25 +00:00 committed by GitHub
parent 5a7db74c52
commit c63761a341
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 18 deletions

View file

@ -72,8 +72,8 @@ void TimelineTrack::paint_event(GUI::PaintEvent& event)
continue;
if (!m_profile.show_scheduler() && !event.frames.is_empty()) {
auto top_frame = event.frames[event.frames.size() - 1];
if (top_frame.symbol == "Kernel::Scheduler::yield()")
const auto& top_frame = event.frames[event.frames.size() - 1];
if (top_frame.symbol == "Kernel::Scheduler::yield()"sv)
continue;
}