Profiler Information?

I looked - I found it, eventually, top Google Hit:

www.bkeeneybriefs.com/category/xojo/?
If you profile your application, the profiler instance will reside in the Run section. More on Profiling later…
reading on Bob explains that the profiling needs to be enabled in the Build Settings. Cool.

Paul’s (old) Real Studio training on Safari shows a nice UI with stats, what I find now is a text file with some unexplained information, e.g.

Main Thread ColourGraph.Open->ColourGraph.CreateGraphs|1|31121.00|00.09%

|1| I am guessing it was called once?
|31121.00| time in method? in seconds? It never took 8+ hours! milliseconds maybe about right?
|00.09%| hmm that confuses me since it was probably > 90% of the time (including methods called by it) from app start to me closing the app as quickly as possible when it had drawn the graphs.

Can anyone explain the profiler output to me please?

Also am I missing something? Is there more to profiling in Xojo? Is there a reference in the Xojo docs that I can’t find?

yes it is milliseconds… but only the time it was running… not idle time

so if you open the app
call your routine
stare at the screen for 7 seconds
quit the app

total run time was say 8 seconds… but your routine took only 1 (1/8 of the time)

also if there is a triangle next to the entry… that means that the time shown on that line is the sum of the times of sub processes (click it to expand)

It took a while for me to figure it all out… but once I did… the data provided pointed out areas where some tuning made HUGE improvements in my code.

Thanks Dave,

It still looks weird though:

My app in this case is a Window that opens immediately when the app starts, it goes straight into a horrible set of calculations (about 250,000 iterations that I want to profile) and renders a graph, I close the app as soon as the Window shows with the graph rendered. So even if I took a few seconds I have about 31 seconds in the main calculation method (above) and I then close to generate the profile. Therefore I can’t see how 00.09% is representative unless background idle time is huge (and it isn’t because 31 seconds is about right for the whole start to finish)

Also there are no disclosure triangles to click - all I get is a file called Profile.txt to open in a text editor, it looks like the old RS IDE was showing this information before. I can live with the text file but that 00.09% seems useless, in all other respects the text file shows what I would expect now that you have confirmed it to me.

It would be helpful if Xojo Inc. put something in the docs about profiling to explain it though :slight_smile:

Hey! I saw the Disclosure Triangle! Sorry I was running the compiled exe instead and getting a text file

I was about to say…you only get the txt file from a compiled execution… and I don’t think it tells you as much as the profiler in the IDE does

User Guide Book 3: Framework, Chapter 8: Debugging, Section 5: Profiler.

Thanks Paul, you are right! Well I didn’t expect you to be wrong. I think the problem for me is that it isn’t referenced anywhere in searches, if I choose ‘Xojo Help’ and enter ‘Profiler’ I get 5 results all about changes to RS2011, RS2012 and 2013 so I knew there was something. When I tried Google I got the bkeeneybriefs site. How about a web cross reference to at least the Chapters and Sections in the Guide Books?

I am working on a Table of Contents for the wiki that ought to help with searches, but I’ve only finished Book 1 so far.