NO

Author Topic: Profiling  (Read 5601 times)

Grincheux

  • Guest
Profiling
« on: March 26, 2021, 08:24:48 AM »
I would like to speed up my program.
I think that using the profiler would help me.
I don't know how to do.
It seems ther is two ways to use it.
One in command line and other from the IDE.
Could some expert help me?


Thank You

Offline John Z

  • Member
  • *
  • Posts: 858
Re: Profiling
« Reply #1 on: April 01, 2021, 10:40:02 AM »
I hope you got profiling working.  I've only used it once or twice and surely I am not an expert.

BTW Today I noticed that many of your MediaFire hosted pictures of your mGimp results are not working. Just FYI -


John Z

Grincheux

  • Guest
Re: Profiling
« Reply #2 on: April 01, 2021, 05:53:30 PM »
For the images that's TRUE. I cleaned the folder and selected too many.
I will try to upload some examples.
The version has changed, when you save the flter dats are stored in a database (for later option)
I have corrected many bugs
I have improved the code
There is a new interface with possiblity to get the previous random generated filter
I have included models
I am currently working on Bias (luminosity) and Divisor.
I compare all my results with XnView to see if my code is good.
I have removed the result histogram
I have completlly rewritten the original histogram
When you don't use divisor, my results are good. I can't say the same thing with it for the instant.
The Bias is indicated in the interface but no code for for the instant.
I have tested the convolution function on thousands images of any sizes and did met any problem.
I have created accelerators but dit not test them.
With the next version you will have to install sqlite3 and put the files into the program folder.

Grincheux

  • Guest
Re: Profiling
« Reply #3 on: April 01, 2021, 05:55:52 PM »
For the profilter I expected a course from Pell oe Frankie. :-[ :-[ :-[ :-[

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: Profiling
« Reply #4 on: April 01, 2021, 07:32:11 PM »
From my point of view, you just turn on the profiler and start your application.
I would first only start and stop the application, then you know where the general code is spending most of the time.
Next I would test one feature after the other separately, so start the application use a feature and stop the application to check the profiler.
It is easier to test step by step instead of a bunch of features and then being not able to distinguish between the single features.

Just my two cents, since I haven't used the profiler of Pelles C, but of other IDE's for other languages.
---
Stefan

Proud member of the UltraDefrag Development Team

Grincheux

  • Guest
Re: Profiling
« Reply #5 on: April 02, 2021, 08:17:09 AM »
Thanks Stefan, that's what I thought. Pelle's Profiler does not have many option but it speaks about a log file that I don't find.
Have a good day

Offline John Z

  • Member
  • *
  • Posts: 858
Re: Profiling
« Reply #6 on: April 02, 2021, 12:53:23 PM »
Using the profiler from within the IDE has more capability I think.
You should set the project to the DEBUG mode and for debug options choose just Line Number - not full debug.
Note that I have found an instance where a program builds and runs fine w/o Debug enabled, but fails to build with Debug - I haven't delved into why yet....

Then set Profiler options under 'Tools', 'Options' then 'Profiler'.

When Profile is run the output will be in the IDE as a new window tab strangely named Profiler  :)

John Z

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: Profiling
« Reply #7 on: April 02, 2021, 03:27:30 PM »
The Pelles C documentation seems to offer all information needed for profiling.
As John says, using the profiler of the IDE is easier and doesn't need any prerequisites.
Searching the documentation for profiler will show all sections needed to utilize the profiler.
The old external profiler will create a log file named like the executable with a prf extension, see the documentation about profiling libraries.
---
Stefan

Proud member of the UltraDefrag Development Team