Page 1 of 1

Profiling Scripts

Posted: Thu Feb 23, 2017 11:07 pm
by [-hh]
Issue 0

I couldn't find any docu on "Profiling Scripts"?

Issue 1

New stack with new button, new field, save the stack. Use any simple script.

Code: Select all

on mouseUp
   repeat 100
    put "A" into fld 1
   end repeat
end mouseUp
1. Start Profiling Scripts.
2. Push the button one or more times.
3. Stop Profiling Scripts.
4. Close the "Script Profile" window.
5. Try to edit the script.

You can't because of
execution error at line 1528 (Object: can't set script while it is executing), char 1.

Editing the script is possible not before restarting LiveCode.

Issue 2

Most of my scripts use "lock messages" for a considerable speed up. Now try this:

Code: Select all

on mouseUp
   lock messages ## <----------
   repeat 100
      put "A" into fld 1
   end repeat
   unlock messages
end mouseUp
1. Start Profiling Scripts.
2. Push the button one or more times.
3. Stop Profiling Scripts.

You'll get an empty profiling report.

Re: Profiling Scripts

Posted: Fri Feb 24, 2017 9:56 pm
by LiveCode_Panos
Hi Hermann,

I have not tested this, but this sounds like a bug.
I couldn't find any docu on "Profiling Scripts"?
In case you have not already seen this, there is a blog post about the script profiler:
http://livecode.com/the-livecode-script-profiler/

Best regards,
Panos
--

Re: Profiling Scripts

Posted: Sat Feb 25, 2017 10:51 am
by [-hh]
@Elanor
Thanks for the "profiling-script-post". Mostly I am too late, this time (issue 0) I was too early.

@Panos
I have the problems now down to more detail. After a refresh/restart of LC I can't replicate issue 1 without having once locked messages (issue 2) before. So the detailed report is titled:

#19331: Lock messages stops profiling scripts (and following edit of scripts).

Regards, Hermann