matchText question

Michael Doub mikedoub at gmail.com
Thu Feb 26 09:07:48 EST 2015


Thanks for the feedback.  I did not know about revAvailableHandlers.

Responding to Mark's comment about what I am trying to do.   I tried the 
MasterLibrary on 7.x and the performance was terrible.  I decided to 
change the implementation to create an index of pointers to the meta 
data around the start and end of each code block.   The previous method 
was to scan for the elements as needed.   Somehow I got it into my head 
that it was related to the way I was doing pattern matching when trying 
to parse the meta data.  I was using a series of matchText statements 
with fairly simple patterns.   I thought that I would try and reduce the 
number of matchTexts by using a more complicated regexp.   My post was a 
request for help regarding that regexp.   As it turns out, that this 
whole adventure could have been avoided if I had better understood the 
performance implications of the different repeat forms.

That all said.   Are you guys aware of any performance analysis tools 
for livecode developers?  I am wondering if it would be reasonable to 
create a development mode within the engine that would gather 
information that would help the developer better understand the behavior 
of the app.

Any thoughts?

Regards,
    Mike


On 2/25/15 10:14 PM, Richard Gaskin wrote:
> Mark Wieder wrote:
>
>> Mike-
>>
>> Wednesday, February 25, 2015, 11:45:21 AM, you wrote:
>>
>>> Am I doing something really crazy here?
>>
>> Depends maybe on what you're trying to do. If you're looking for a
>> list of handlers in a script, here's what I use:
>>
>> function getHandlersList pScript
>>   local tHandlers
>>   filter pScript with "end*"
>>   repeat for each line tLine in pScript
>>     put word 2 of tLine & cr after tHandlers
>>   end repeat
>>   return tHandlers
>> end getHandlersList
>
> One more way:
>
> get the revAvailableHandlers of tSomeObject
>





More information about the use-livecode mailing list