Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
hpsh wrote: Fri Dec 18, 2020 8:26 pm
for me, 10000 lines of random text, with some hit and misses, takes 5 ticks with the filter variation, and something like 160 with the for each
but if the hits are put into a string, and after that is put into the result field it is pretty much the same
so seems to me it pretty fast, but yeah, the more lines, the slower it will go
An ideal solution maintains performance relative to data size.
And position sometimes matters. In my older comparison where chunk expressions shined the filter was evaluating something like the 15th item out of 20 in each line, where RegEx's generalized parsing was (at least at that time) slightly slower than LC's chunk parsing (at least given the other factors like average item length).
Richard Gaskin LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
yeah, twice the data, is typically more than twice the time. has tried to do some sorting algorithms, and about 10000 lines seem typical to be painfully slow.
wonder how it would be with a lot more lines, and if something like putting it in an array would help.
-- Sent when the mouse is released after clicking
-- pMouseButton specifies which mouse button was pressed
on mouseUp pMouseButton
local mTicks, mText
put the ticks into mTicks
put empty into field "2"
repeat for each line tLine in field "1"
if matchtext(tLine,"[X]\d{5}") then
put tLine&cr after mText
end if
end repeat
put mText into field 2
put the ticks - mTicks into field "time"
end mouseUp
cannot find how to upload the complete source code? did this not used to be a thing?