I like this technique so that I can do ad hock timings as needed in a complicated User Interface in MATLAB.
4 CommentsOldest to Newest
In my experience many Matlab programmers are surprisingly unaware that they can turn profiling on and off at will, interactively or programmatically, while a Matlab program is running. Doing so can significantly improve our profiling and performance-tuning effectiveness.
I don’t normally use dedicated GUI controls, since this “soils” my GUI, and I’d need to update the layout. Instead, I typically just run
profile on; ... profile off; profile report"
from the Command Prompt just before starting the workflow-to-be-analyzed. Simpler still, I click the “Start/Stop profiling” button in the Profiler tool. Another simpler alternative is to create two simple shortcuts in the Desktop that start/stop profiling respectively. This obviates the need to update numerous different GUIs separately.
In a related note, I often use the technique of selective workflow profiling to understand how a customer’s GUI behaves and works. I start profiling, interact with a specific GUI part, and then stop profiling and look at the detailed report to see what the code did in this time. It is then easy to step right into the relevant part and start coding/fixing. Customers are often surprised how quickly I can understand and fix their code, when it’s really just the selective use of the Profiler… Let’s keep this trade secret between us, shall we? :-)
Fabulous, what a weblog it is! This weblog presents valuable facts to us, keep it up.
I am curjous to find out what blog system you have been utilizing?
I’m having some small security issues with my latest blog and I’d like to fimd something
mpre safeguarded. Do you have any suggestions?
Hi, all the time i used to check webpage posts here early in the break of day,
as i love to learn more and more.