Help Raspberry PI Lazarus Is Slow lazarus / 32-Linux ---------------------------------------------------------------------- HarryCover · 2018-05-22 17:56 Hello everyone I get closer to you to find a solution, I wrote a program that recovered a record via Socket with 700 character divided as follows 350 Char corresponding to my text and 350 CharColor corresponding to the color of my Char all in 2 tables MonChar and CharColor each character must be written in a Label of 1 characters (so in total my sheet at 350 Label) so in my timer here is my code i use TidClient to recev Record and after i use BytesTo1Raw(RecvBuf, pMonRecord, Sizeof TMonRecord)); Label1.caption:= pMonRecord.MonChar .text; Label1.font.Color:= MyColor (pMonRecord.CharColor .text This line is written 350 times implement up to 350 Label of course and according to the Char of my record also So, the function code perfectly, But the problem is that my timer is set to 15ms and the processing of this procedure takes 6 seconds before being displayed for info I test in a same problem Thread I have a Raspberry PI3 with a class 10 SD card and Debian Do you have a solution so that the processing of this procedure can be faster Sorry i'm a french and i use Google traduction cordially Harry ---------------------------------------------------------------------- engkin · 2018-05-22 18:43 You are using the wrong control (TLabel) for this application, because every time you change the Text or Font.Color of any TLabel a message is sent to repaint the underlying form parent control (usually the form). In your example that is 700 times. Find a different approach. Edit: Try to lock the form.canvas before updating the labels and unlock it when done. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   form1.Canvas.LockCanvas;....update lablels  form1.Canvas.UnlockCanvas; ---------------------------------------------------------------------- HarryCover · 2018-05-22 20:25 Thank you for your help, I will test your proposal tomorrow. I'll tell you if it worked cordially Harry ---------------------------------------------------------------------- HarryCover · 2018-05-24 18:13 Hello and thank you for your help Actually now the display is a little faster, 2s but not enough yet, the ping on both sides is 5 to 14 ms, is that the thread writing is the same as Windows and Delphi for Arm processors cordially Harry ---------------------------------------------------------------------- engkin · 2018-05-24 23:35 The key is to find a better method. For instance, hide all the labels (Visible := False) and use them just for their location in the OnPaint event of the form: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.FormPaint(Sender: TObject);begin  Canvas.Brush.Style:=bsClear;   Canvas.Font.Color := MyColor(pMonRecord.CharColor[0][0].text);  Canvas.TextOut(Label1.Left, Label1.Top, pMonRecord.MonChar[0][0].text); ---------------------------------------------------------------------- HarryCover · 2018-05-25 11:00 Thank you I will test, but in your code it is wrong to consider that each label has its color it is each character can have a different color I have 5 color that is assigned by a color function that corresponds to the letter received via socket Harry ---------------------------------------------------------------------- Josh · 2018-05-25 12:44 Hi Are the coloured characters being displayed in various location over the form, or are they in a row like in a string of coloured characters. Just trying to get an idea of what the display looks like and is displaying. ---------------------------------------------------------------------- HarryCover · 2018-05-25 14:27 Hello, Actually it's complicated to explain, I propose to see the video of the Android version of my Software here https://www.youtube.com/watch?v=u7tjZ--0ng4&feature=youtu.be It is necessary to know that each character is in 1 label and each character with its color Watch from 5 minutes you will understand better what I want And Tonight i test with other SD CARD Thanks again to everyone Harry