Commit a3061dad authored by Guillaume Seguin's avatar Guillaume Seguin

Trim down memory usage of prontserve's GCoder implementation

Removed all the unused slots and fallback to Cython.
parent 5acc68d4
......@@ -402,16 +402,12 @@ class EventEmitter(object):
continue
# Fast GCode. Because the GCode class is slow.
# Faster GCoder implementation without any parsing
# -------------------------------------------------
class PyLine(object):
class Line(object):
__slots__ = ('x','y','z','e','f','i','j',
'raw', 'command', 'is_move',
'relative','relative_e',
'current_x', 'current_y', 'current_z', 'extruding', 'current_tool',
'gcview_end_vertex')
__slots__ = ('raw', 'command', 'is_move')
def __init__(self, l):
self.raw = l
......@@ -419,12 +415,6 @@ class PyLine(object):
def __getattr__(self, name):
return None
try:
from printrun import gcoder_line
Line = gcoder_line.GLine
except ImportError:
Line = PyLine
class FastGCode(object):
def __init__(self,data):
self.lines = [Line(l2) for l2 in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment