Skip to content

Analysing performance (Webclient)

UnknownShadow200 edited this page Apr 18, 2021 · 1 revision

Most modern web browsers include integrated tools that you can use to analyse the performance of the webclient.

Although the steps for doing so are similar between browsers, for simplicity this page will only show the steps for Chrome.

Setup

  1. Open Developer Tools

ch_open_dev_tools

  1. Go to Performance tab
  2. Click Record button

ch_record_button

Measuring

Now perform the actions that you are trying to measure the performance of. (e.g. joining a large world, rendering a map with many entities)

Once you've finished, click Stop on the recording dialog.

ch_dialog_stop

Analysing results

Initially a summary of the time spent is shown:

ch_summary

The two main areas that should be noted are

  1. Scripting
  2. Rendering

Scripting should usually take up more time than Rendering.


If you switch to the Call Tree tab, you can see a top down view of what specifically takes the most time to execute

For example:

ch_call_tree

Here you can see that the majority of the time spent in Animation Frame Fired.

If you then expand Animation Frame Fired:

ch_call_tree_render

Here you can see that the majority of the time spent rendering frames (5718 ms) was spent rendering the 3D parts of the game in Game_Render3D (4032 ms).

In turn, the majority of the time spent rendering the 3D parts of the game (4032 ms) was spent rendering the blocks in the world in MapRenderer_RenderNormal (2221 ms) + MapRenderer_RenderTranslucent (559 ms).


If you switch to the Bottom-Up tab, you can see a bottom up view of what specifically takes the most time to execute.

(Note: for analysing webclient's performance, this is usually less useful than the top down view, but can still provide some insight)

For example:

ch_bottom_up

Here you can see that

  • 737 ms was spent in drawElements (actually drawing vertices)
  • 728 ms was spent in vertexAttribPointer (setting up for drawing)
  • 526 ms was spent in bindBuffer (setting active vertex buffer)
  • 357 ms was spent in _RenderNormalBatch