Canvas Rendering Profiling

From Inkscape Wiki
Revision as of 18:31, 10 October 2019 by Jabiertxof (talk | contribs)
Jump to navigation Jump to search

This profiling help you to compare time of the iddle process of a Inkacape operation. One operation maybe can take multiple idle process, like draging...

One thing to do is make a script to allow devs to follow and compare with a fixed guide. I use this one but I miss node selection and deselection

We consider a iddle process the time since something change in Inkscape and is marked to render to the next finished state with the changes reflected on screen. A iddle process always render all on finish (when the log show output).

This is good to compare improvements with other branches or commits.

To enable dev need to uncomment the line


Once done, on each iddle process you get diferent ouput, to explain I try so fill a bit background:

This is a example of a iddle process:

A started iddle loop can be delayed by a UpdateNow(), not always happends, and time are part of the started iddle process

  • updateNow() started 0.12
  • updateNow() ended 0.20
  • updateNow() started 0.42
  • updateNow() ended 0.70

Iddle process can be paused (counting one loop more) without full render, because process is a bit long and we want to give control to main loop to update requests and mark other zones to render.

  • 3 loops in last idle

Depends of the number of tiles in preferences->rendring we split a render rendering in blocks, this is the full number of blocks painted correctly (in the 3 loops)

  • 25 splits in last idle

Total duration of just finished iddle process

  • 1.25 last idle loop duration

Acumulative duration to allow multiple operation comparsions. To resert, put a moment the document in outline mode

  • 34.25 total rendering duration

To take account.

In rendering is very important and can change results from diferent systems/configuration

  • Canvas size (Is maximized? How resolution has your Screen? Is HiDPI scaling enabled?)
  • Number of tiles in preferences-> rendering. Inkscape by default use 16, to share values I usualy use this setings (but test code in more values specialy very low values, I use 1...)
  • Cache of rendering in preferences-> rendering, Inkscape use 64MB by default.
  • We run GDB or not
  • Current process running

Also is important we can get rendering gap on the same operands by the current status of the machine, the maximun gap I find is < 0.1 in similar envirment.