HP Forums
PROBLEM VERY LONG LISTS - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: PROBLEM VERY LONG LISTS (/thread-7752.html)



PROBLEM VERY LONG LISTS - Tyann - 02-10-2017 12:31 PM

Bonjour
Sur la calculatrice:
Je manipule actuellement de très longues listes, >9000 éléments, lorsque ces listes
se retrouvent dans l'historique de l'écran de calcul dans Home, l'affichage de celui-ci tend à
ralentir très fortement.
Exemple je suis dans 'Notes' et j'appuie sur 'ESC' pour revenir à Home, l'affichage de l'historique se fait ligne
par ligne lentement.
J' ai chronométré 31 s pour un historique de 7 lignes avec diverses manipulations d'une liste de 5600 éléments.
Aujourd'hui je regroupe ces listes sous forme de listes de listes ({ {liste1},{liste2},etc...} soit environs 50 000 éléments au total.
Après l'affectation AFiles("nom"):={{AFiles("nom1"),Afiles("nom2",....AFiles("nom6")} 'ENTER' toujours dans Home , la machine semble figée pas de sablier, attente? , la machine s'éteint au bout de quelques minutes.
'On' la machine se rallume et le résultat est là :affichage de l'affectation dans l'historique et du début de la liste de listes dans la ligne de commande.
'ENTER' pour placer cette liste de listes dans l'historique puis 'Notes' puis 'ESC' la machine reste sur l'écran Notes, le sablier mouline jusqu'à l'auto extinction de la machine.
Au rallumage je suis sur l'écran Home ?

Hello
On the calculator:
I currently handle very long lists,> 9000 elements, when these lists
Are found in the history of the calculation screen in Home, the display of this one tends to
Slow down very sharply.
Example I am in 'Notes' and I press 'ESC' to return to Home, the display of the history is done line
By line slowly.
I clocked 31 s for a history of 7 lines with various manipulations of a list of 5600 elements.
Today I group these lists in the form of list lists ({{list1}, {list2}, etc ...} or around 50,000 elements in total.
After the assignment AFiles ("name"):= {{AFiles (name1)), Afiles ("name2", .... AFiles ("name6")} 'ENTER',the machine seems frozen, waiting ?, the machine switches off after a few minutes.
'On' the machine turns on and the result is there: display of the assignment in the history and the beginning of the list of lists in the command line.
'ENTER' to place this list of lists in the history then 'Notes' then 'ESC' the machine remains on the Notes screen, the timer will mute until the machine is turned off.
On re-ignition I'm on the Home screen.

Désolé pour la tartine
Sorry for the toast


RE: PROBLEM VERY LONG LISTS - eried - 02-12-2017 10:22 AM

What are you doing with all these lists? Maybe there is an alternative way to achieve the same?


RE: PROBLEM VERY LONG LISTS - Tyann - 02-12-2017 12:44 PM

(02-12-2017 10:22 AM)eried Wrote:  What are you doing with all these lists? Maybe there is an alternative way to achieve the same?

Bonjour

Je travaille sur une application 'Dictionnaire', les mots sont stockés dans des variables AFiles :
sous forme de listes de listes (à cause de la limitation à 9999 éléments) regroupés par nombre de lettres.
En fait l'utilisation de ces longues listes dans mon code semble plutot bien fonctionner pour le moment.
C'est lorsque je récupère ces mots qui sont à la base dans des fichiers .txt que j'importe sous forme de Notes.
Je transforme ces notes en listes avec une fonction Split de mon cru.
Un fichier se présente de la manière suivante : nom1, nom2, nom3, etc....
Puis je vérifie que tous les mots sont de la même longueur (cas d'une erreur de frappe) puis je concaténe la liste crée à la variable AFiles dans l'écran Home, c'est lors de ces manipulations que j'ai remarqué ces ralentissements et que je me suis dit qu'il était peut-être bon de les signaler.

Hello

I am working on an application 'Dictionary', the words are stored in AFiles variables:
In the form of lists of lists (because of the limitation to 9999 elements) grouped by number of letters.
In fact the use of these long lists in my code seems to work well for the moment.
This is when I retrieve these words that are the basis in .txt files that I import as Notes.
I transform these notes into lists with a Split function of my own.
A file looks like this: name1, name2, name3, etc ....
Then I check that all the words are of the same length (case of a typing error) then I concatenates the list created to the variable AFiles in the Home screen, it is during these manipulations that I noticed these Slowdowns and I thought it might be good to report them.


RE: PROBLEM VERY LONG LISTS - Han - 02-12-2017 01:22 PM

I wonder if using a hash table would enable you to work around having to load more than one list at any given time.


RE: PROBLEM VERY LONG LISTS - eried - 02-12-2017 10:17 PM

As Han said, I think you could improve everything thinking on a different way to access the lists. It does not need to be fancy, you can take the first N letters of the word and have several files containing smaller and more manageable chunks of data.

Example, just use lang_firstletter.txt, so you need about 30 files per language:
en_a.txt
en_b.tct
...


RE: PROBLEM VERY LONG LISTS - cyrille de brébisson - 02-13-2017 06:22 AM

Hello,

Very long lists are not a good idea if they are going to be displayed!

One thing that you can do, if the display is only for debuging purpose while creating the program is turn off 2D display. It should speed things up.

Cyrille


RE: PROBLEM VERY LONG LISTS - Tyann - 02-13-2017 06:23 AM

Bonjour

Mon application est sur une seule langue, pas de traduction, elle permet la vérification d'un mot
la recherche d'un mot avec des jokers (exemple :??a?es) et enfin des anagrammes.
La recherche se fait sur un nombre de lettres déterminé.
C'est pourquoi je les ai classé selon ce critère.Les listes permettent d'utiliser POS( pour la recherche.
Je pensais que cela serait un moyen rapide.
Après je ne suis pas un programmeur professionnel et cela est avant tout pour moi un divertissement,
il y a surement d'autres méthodes plus efficaces.

Hello

My application is on a single language, no translation, it allows the verification of a word
The search for a word with jokers (example: ?? a? Es) and finally anagrams.
The search is done on a determined number of letters.
That is why I have classified them according to this criterion. The lists allow to use POS( for the search.
I thought that would be a quick way.
After I am not a professional programmer and this is above all for me an entertainment,
There are surely other more effective methods.

------------------------------------------------------------------------------------

Merci Cyrille, je vais tester cela.
Thank you Cyrille, I will test this.


RE: PROBLEM VERY LONG LISTS - Tim Wessman - 02-13-2017 03:35 PM

Specifically, the reason you see such a slow down in the drawing is because it is a very large 2D object.

[EDIT]
Note that it isn't "displaying" or "making" a very large graphic, but it takes a long time to parse the 9000+ list entries and calculate the sizes of every object.


RE: PROBLEM VERY LONG LISTS - Tyann - 02-13-2017 06:52 PM

Bonsoir
Je viens de tester sans l'affichage 2D, c'est le jour et la nuit.
Merci Cyrille et Tim pour les conseils et explications.

Good evening
I just tested without the 2D display, it's day and night.
Thank you Cyrille and Tim for the advice and explanations.


RE: PROBLEM VERY LONG LISTS - cyrille de brébisson - 02-14-2017 06:42 AM

Hello,

to 2D Print, the system has to scan the entire list to make sure that they are no 2D objects in the list that would force it to display taller. This is a slow operation.

for 1D display, it only needs to stringify the start of the object. much simpler and faster.

Cyrille