AW: How do you handle the poor performance of LC 7?
Tiemo Hollmann TB
toolbook at kestner.de
Sat May 30 09:25:17 EDT 2015
Hi Richard,
the scenario is a field to enter a search term. With each entered character
(keyUp) or each backspace (rawKeyUp) correcting the search term I call the
following selecting routine to get a "live selection" of my 20,000 record
list of words. In LC 6 I can enter the chars as fast as I want and this
handler is always "on time" to show me the result list. In LC 7.0.5 it
swallows the entered chars, can't catch up until it stucks completely. I am
not talking of a slow down of 10 or 50%. I am talking about a slow down of
some x100%, which makes the complete handling unacceptable. Maybe my code
isn't very professional, so feel free to show up better style. I have send
Hanson my original real live stack.
Tiemo
Here is the relevant piece of code:
repeat for each key tKey in garrVideos -- alle Begriffe und Sätze
durchgehen
if gAktRubrik <> 99 and gAktRubrik is not item 2 of garrVideos[tKey]
then next repeat -- falsche Rubrik
if tBegriffFlag is not item 6 of garrVideos[tKey] then next repeat --
falsche Kategorie Begriffe
if gMenuAktuell is "Bearbeiten" and tKey is in tLernlistenInhalt then
next repeat -- Begriff schon in Lernliste
if tSuchbegriff is empty then -- kein Suchbegriff, Begriff/Satz
übernehmen
put tKey & cr after tListe
else -- nach Suchbegriff selektieren
if tSuchenBeliebig is true then -- an beliebiger Stelle im Wort
suchen
if tKey contains tSuchbegriff then -- Wort/Satz enthält
Suchbegriff
put tKey & cr after tListe
end if
else -- Suchbegriff nur am Anfang des Wortes
if tKey begins with tSuchbegriff then -- Wort/Satz beginnt mit
Suchbegriff
put tKey & cr after tListe
end if
end if
end if
end repeat
if tListe is not empty then delete last char of tListe -- letzten CR
löschen
put xSortListe(tListe) into fld "Liste" -- Text ins Anzeigefeld kopieren
-----Ursprüngliche Nachricht-----
Von: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] Im Auftrag
von Richard Gaskin
Gesendet: Freitag, 29. Mai 2015 20:12
An: use-livecode at lists.runrev.com
Betreff: Re: How do you handle the poor performance of LC 7?
Tiemo Hollmann wrote:
> Testing my stacks in LC 7.0.5 , they show such a poor performance.
> E.g. plain repeat loops with 20,000 records which take a fraction > of a
second in LC 6, last up to 10 seconds in LC 7, which is more > than
unacceptable for me / my clients on old poor machines.
Can you post the code for that loop, and tell us a bit about the data it
works on?
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
____________________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list