Profiling Evince

First you'll need to get the source code. Once you have a working copy you need to enable profiling using the following configure option.

meson setup -Ddebug=true

PROFILING

The way of doing profiling has changed for the GTK4 move. Until that is in main, it only lives in the "evince-next" branch. You can find descriptions of both approaches below.

GTK4 evince

The new way of doing profiling is described in https://gnome.pages.gitlab.gnome.org/evince/view/profiling.html

GTK3 evince

At execution time, you must enable the profiling service. To enable the profiling service, set the environment variable for the section you want to profile or set EV_PROFILE to enable the profiling service for all sections.

The following sections are available:

EV_PROFILE_JOBS

Example:

EV_PROFILE_JOBS=1 evince document.pdf

output:

$ EV_PROFILE=1 evince document.pdf
[ EvJobLoad (0x8874d20) ] 0.360840 s elapsed
[ Rendering page 48 ] 0.222790 s elapsed
[ EvJobRender (0x8a63a70) ] 0.332271 s elapsed
[ Rendering page 46 ] 0.126202 s elapsed
[ Rendering page 47 ] 0.199145 s elapsed
[ Rendering page 49 ] 0.092226 s elapsed
[ EvJobRender (0x8a63b08) ] 0.340616 s elapsed
[ EvJobRender (0x8a63ba0) ] 0.216947 s elapsed
[ EvJobRender (0x8a63c38) ] 0.109909 s elapsed
[ Rendering page 50 ] 0.137831 s elapsed
[ EvJobRender (0x8a63cd0) ] 0.155486 s elapsed
[ EvJobLinks (0x8a21520) ] 0.069309 s elapsed
[ EvJobThumbnail (0x8a2c780) ] 0.028615 s elapsed
[ Rendering page 51 ] 0.041854 s elapsed
[ EvJobRender (0x8a81e98) ] 0.062720 s elapsed
[ Rendering page 52 ] 0.112581 s elapsed
[ EvJobRender (0x8a81f30) ] 0.132046 s elapsed
[ Rendering page 53 ] 0.011330 s elapsed
[ EvJobRender (0x8a81f30) ] 0.084873 s elapsed

Try this with some standard test documents from testing to profile against

Apps/Evince/Profiling (last edited 2023-08-13 18:13:05 by PabloCorrea)