Skip to content

Latest commit

 

History

History
42 lines (22 loc) · 1.4 KB

ProfilingRenderer.md

File metadata and controls

42 lines (22 loc) · 1.4 KB

Profiling GlueStick renderer

Requirements: node 8.4.0+

In order to start profiling gluestick renderer (aka server), the first thing you need to do is to capture the profile information. Just follow these steps:

  1. Run gluestick start-client command.

  2. Run gluestick start-server -D command in a separate terminal/tab.

    -D flag is used to run the server in debug mode.

  3. Open Chrome Dev Tools (cmd + alt + i on MacOS)

  4. Click Node.js logo in top-left corner

    Open Node.js DevTools

  5. Navigate to Profiler tab and click record button

    Record profile

  6. Open the desired page served by GlueStick in a browser, for instance http://localhost:8880.

  7. Stop recording after the page is loaded.

    Stop recording the profile

You should see the profile chart now.

Profile chart

Now you can see the trace and the time spent on each function call, so you can analyse, pinpoint the expensive functions and optimise them.

Tip: By clicking on the function call in the chart, you will be redirected to its source.

Other resources