Hello, I have tried the query performance counter/frequency method for example program: (https://www.freetype.org/freetype2/docs/tutorial/example1.c) on Windows with arial.ttf and FT2_DEBUG=any:7 on string:"qwertyuiopasdfghjklzxcvbnm" which produced 24260 logs. I have executed the test program multiple times and below are the average time for each case in seconds: FT_LOGGING:8 sec ( writes logs to file freetype.log) FT_DEBUG_LEVEL_TRACE: 40 sec (writes logs to stderr) NO_DEBUGGING:7 sec I have also prepared a test program for this @ here <https://github.com/Priyeshkkumar/FreeTypeExamples/tree/master/Windows/main> , so that if anyone wants to test they can also try and test the results... The Visual Studios solution contains three different configurations for the x64 platform: FT_LOGGING: linked with FreeType library built with FT_LOGGING macro enabled. FT_DEBUG_LEVEL_TRACE: linked with FreeType library built with FT_DEBUG_LEVEL_TRACE macro enabled. NO_DEBUGGING: linked with release built of FreeType library
Please look into this and provide feedback... Thanks, Priyesh On Thu, Jul 16, 2020 at 11:24 AM Priyesh kumar <[email protected]> wrote: > Hi Vincent, > Thanks for the suggestion it seems very helpful, I will try it and let you > know in case of any query. > > Thanks, > Priyesh > > On Thu, Jul 16, 2020 at 4:14 PM Vincent Torri <[email protected]> > wrote: > >> On Thu, Jul 16, 2020 at 9:51 AM Werner LEMBERG <[email protected]> wrote: >> > >> > >> > >> *Have you set `FT2_DEBUG=any:7` in the environment?* >> > > >> > > Sorry, I forgot to mention this, I have used FT2_DEBUG=any:7 with >> > > OpenSans-Bold.ttf font. >> > >> > OK. >> > >> > > Also, I wanted to ask is this the right approach for profiling? >> > >> > I'm not an expert, sorry. However, you might also try `valgrind >> > --tool=cachegrind` (on GNU/Linux), which gives you detailed >> > information on used CPU cycles including instruction and data caches. >> >> also >> valgrind --tool=callgrind + kcachegrind >> and >> oprofile could be useful >> >> Vincen Torri >> >
