1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00

ProfileViewer: Parse the JSON input directly to Profile::Event

We were going from "new JSON format" => "old JSON format" => Event.
This made loading longer profiles unnecessarily slow. It's still pretty
slow, and we should... profile it! :^)
This commit is contained in:
Andreas Kling 2020-03-02 20:24:58 +01:00
parent 8eaac171d7
commit e7f8c8a342
2 changed files with 30 additions and 61 deletions

View file

@ -138,11 +138,10 @@ public:
void set_inverted(bool);
private:
explicit Profile(const JsonArray&);
explicit Profile(Vector<Event>);
void rebuild_tree();
JsonArray m_json;
RefPtr<ProfileModel> m_model;
Vector<NonnullRefPtr<ProfileNode>> m_roots;
u64 m_first_timestamp { 0 };