Recent

Author Topic: High CPU using LazSerial  (Read 3452 times)

bsg55

  • Newbie
  • Posts: 3
High CPU using LazSerial
« on: February 14, 2014, 09:47:25 am »
First off, thanks for LazSerial, excellent work.
Has anyone noticed a high CPU after you open a port with LazSerial? I have been previously using synaser without the high CPU issue, LazSerial seems to be better in terms of controlling read data IMHO.
I have an Atom D425 proc (Acer N281G) and CPU jumps to ~70% and stays there until I close the port....very odd....even with no device connected it does the same. I must be doing something wrong? I am on Lubuntu 14.04 using Lazarus 1.0.10+dfsg-1 and LazSerial v0.1.
Any pointers would be much appreciated.

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1290
Re: High CPU using LazSerial
« Reply #1 on: February 14, 2014, 03:03:55 pm »
hello,
on Ubuntu 12.04 64 bits lazarus 1.1,  with the test project sertest , i have no problem.  If i open an usb-serial  port , 0% CPU . If i send nmea frames with the gps simulator 0 % CPU.  Have you the same high CPU load with the sertest project ?

Friendly J.P
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

bsg55

  • Newbie
  • Posts: 3
Re: High CPU using LazSerial
« Reply #2 on: February 14, 2014, 11:49:06 pm »
I noticed that if no receive buffer is set (via RxData) it pushes the CPU usage up to around 70%. I am using a real serial port.
I would normally set a receive buffer however for what I am doing I only need to send commands not decipher responses, hence why no buffer was setup (I suppose it is good practice to set one up though!).
Yes, sertest works fine, thanks.
« Last Edit: February 15, 2014, 12:15:44 am by bsg55 »

 

TinyPortal © 2005-2018