Doodle3D / print3d

The application that runs on a Doodle3D WiFi box that communicates with printers.
www.doodle3d.com
GNU General Public License v2.0
13 stars 4 forks source link

Improved effiency when adding gcode #42

Open woutgg opened 8 years ago

woutgg commented 8 years ago

When adding many lines of gcode at once while a print is in progress, the printer stutters noticeably. For instance when sending 2000 lines, this takes about 220ms to process. With the current client behaviour of sending 500 lines each time, the printer does not stutter.

500 lines take about 55ms to process, so processing time seems to depend linearly on the amount of lines (about 1 msec per 9 lines).

We could have a look into this to find any bottlenecks and possibly make improvements there.

Creating a separate thread for printing to make it immune to other 'chores' would of course be an option, but might also add unnecessary complexity and risk of race condition bugs.