Sloeber / arduino-eclipse-plugin

A plugin to make programming the arduino in eclipse easy
https://eclipse.baeyens.it/
419 stars 131 forks source link

Doing Serial.println every frame lags the Sloeber #830

Closed Silidrone closed 6 years ago

Silidrone commented 7 years ago

When you send every frame something to be printed in Serial Monitor, the whole sloeber lags and cant even compile...

jantje commented 7 years ago

Can you be more specific on what you do and why you think this is worth a issue? Also which os/hardware do you use, which sloeber version which board?

As an independent open source project we value your submission, but we ask for support, either by helping us out coding (yeah, we do understand it does require time) or a Patreon contribution (starting from as low as 1$ a month): this allows us to support people who support us back! As a supporter you can drag our attention and prioritize your submission... please become a supporter! https://www.patreon.com/jantje

jantje commented 7 years ago

closing due to lack of response.

Silidrone commented 7 years ago

I am sorry for not responding this long, I am using esp8266, and when I open serial monitor, if I print too much in my code, the sloeber delays every action such as undo, build, upload... I am on Windows 10, CPU: i7-4710HQ @ 2.50 GHz, RAM: 16GB. It is 4.1 Version (Sloeber version), I think, I am not sure how to check which version it is.

jantje commented 7 years ago

if I print too much in my code,

There is indeed a processor penalty for using serial as there is a penalty for using any device. You may not realize but lowering the baud rate will make your esp suffer the penalty as the serial queue will get full. So the question is how much do you send and is the processor penalty caused by Sloeber for receiving that amount of data acceptable or not.

Silidrone commented 7 years ago

The esp8266 lags when you send him more then 10000 prints at once, which is not sloeber's problem, but esp8266's. But forget that, lets say I dont send that much at once, lets say I send 200 at once every frame (in loop), sloeber has (serial monitor in sloeber) hard time recieveing that much, and delays my all actions, as I said. By the way, the baud rate is set at 9600.

uzi18 commented 7 years ago

Have also encounter slow printing in serial monitor and terminal.

Even some upload tools does not work properly in terminal but same command pasted to real terminal works ok.

10.10.2017 3:48 PM "Silidrone" notifications@github.com napisał(a):

The esp8266 lags when you send him more then 10000 prints at once, which is not sloeber's problem, but esp8266's. But forget that, lets say I dont send that much at once, lets say I send 200 at once every frame (in loop), sloeber has (serial monitor in sloeber) hard time recieveing that much, and delays my all actions, as I said. By the way, the baud rate is set at 9600.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Sloeber/arduino-eclipse-plugin/issues/830#issuecomment-335477997, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHOU7DEBmEtTo_9blC_HOKrgcXnDRxmks5sq3WTgaJpZM4Piq4Y .

Silidrone commented 7 years ago

By the way, is the issue reopen-able? As I did respond now.

jantje commented 7 years ago

From what I understand there are multiple requests to increase the performance of the serial monitor. However some realism is needed. 1) Sloeber will never be as performant as a real terminal program. 2) lag is normal in a serial communication where there is a output and a input queue. If you want to know the "pc/sloeber" lag you need to make sure the "output buffer" on the embedded device is empty before sending the message used to time the lag. This is code like I have in my library here https://github.com/jantje/ArduinoLibraries/blob/master/SerialCommunicator/SerialCommunicator.cpp#L168 3) When you need performance do not filter for the plotter. This filtering has serious impact on the performance.

@uzi18 you say

Even some upload tools does not work properly in terminal but same command

What do you mean by that? I do not see the link between upload tools and the terminal. When Sloeber starts upload tools it closes the terminal connection runs the upload tool and reopens the connection.

uzi18 commented 7 years ago

Ad.1 if it is ok for you so lagging is not a problem. My laptop is not new one but in Arduino IDE it works quiet fast. In the same conditions.

For programming with script megaflash/esp-link, need own programers.txt file, it is almost work - once per 5-6 launches. I need investigate it but in different issue. Outside Sloeber it works every time. Another issue not all options are passed to uploader executable, this is related to platform.txt/programmers.txt support.

jantje commented 7 years ago

For programming with script megaflash/esp-link, need own programers.txt file, it is almost work - once per 5-6 launches. I need investigate it but in different issue. Outside Sloeber it works every time. Another issue not all options are passed to uploader executable, this is related to platform.txt/programmers.txt support.

this is a different issue and is not related to serial monitor performance. please create a different issue and provide the upload console output.

jantje commented 7 years ago

I have been thinking about this one. I fixed some delay issues in closing the serial monitor which may be related to upload issues because of the delays the serialmonitor causes due to lag after closing. So the nightly might behave better.

jantje commented 6 years ago

The nightly from 29/11 should be far better. Can you do a test to see whether it is sufficient?

uzi18 commented 6 years ago

I will try it, thanks for info

28.11.2017 1:42 PM "jantje" notifications@github.com napisał(a):

The nightly from 29/11 should be far better. Can you do a test to see whether it is sufficient?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Sloeber/arduino-eclipse-plugin/issues/830#issuecomment-347511854, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHOU_hJXKE8VqgEzZJIclTUG63wNLbMks5s6_-5gaJpZM4Piq4Y .

jantje commented 6 years ago

did you have time to try?

jantje commented 6 years ago

Please reopen if not fixed