mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:58:11 +00:00
ProfileViewer: Convert the JSON samples into a more efficient format
Only do the conversion from JSON once. This makes it much faster to do time range filtering with the timeline widget. :^)
This commit is contained in:
parent
d4a570d576
commit
063fef312e
3 changed files with 48 additions and 36 deletions
|
@ -28,8 +28,8 @@ void ProfileTimelineWidget::paint_event(GPaintEvent& event)
|
|||
|
||||
float column_width = (float)frame_inner_rect().width() / (float)m_profile.length_in_ms();
|
||||
|
||||
for (auto& sample : m_profile.sample_data()) {
|
||||
u64 t = sample.timestamp;
|
||||
for (auto& sample : m_profile.samples()) {
|
||||
u64 t = sample.timestamp - m_profile.first_timestamp();
|
||||
int x = (int)((float)t * column_width);
|
||||
int cw = max(1, (int)column_width);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue