Profiling Scripts

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1808
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Profiling Scripts

Post by [-hh] » Thu Feb 23, 2017 11:07 pm

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.
shiftLock happens

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 507
Joined: Fri Feb 06, 2015 4:03 pm

Re: Profiling Scripts

Post by LiveCode_Panos » Fri Feb 24, 2017 9:56 pm

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
--

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1808
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Profiling Scripts

Post by [-hh] » Sat Feb 25, 2017 10:51 am

@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
shiftLock happens

Post Reply

Return to “Bug Triage”