11-17-2021 03:56 AM
Bonjour a tous,
je développe actuellement une interface qui doit me permettre de lire et envoyer des trames CAN. sauf que le programme doit pouvoir lire au moins 800 trames CAN et qu'il est très lent pour le faire. Quelqu'un serait-il comment aller plus vite. Je fournis un extrait de mon code.
Pour infos la réception de la trame CAN se fait avec les fichier PCANBasic.h de Peak.
Merci d'avance.
11-17-2021 05:44 AM
You are entirely creating the table from scratch, but some operations can probably be saved to avoid wasting execution time. Definition of columns is probably constant across all frames, so if you prepare an empty table with all necessary columns already customized as per data type, precision and so on you will save some operations.
Having said this, the normal way to speed up table operations is to hide it before updating it and show it afterwards, but I don't know if it can be feasible in your application. Another tip is to use SetTableCellAttribute (..., ..., ..., ATTR_CTRL_VAL, ...) instead of SetTableCellVal (). All these hints are aimed to defer actual screen update since it is a known bottleneck: if you need to keep the user informed of process development you may add some ProcessDrawEvents () at slow intervals
11-29-2021 07:04 AM
thank you for answer