disable GC for locationd and paramsd (#20680)

pull/20686/head
Willem Melching 4 years ago committed by GitHub
parent 2eac604993
commit fc478ff920
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      selfdrive/locationd/locationd.py
  2. 3
      selfdrive/locationd/paramsd.py

@ -1,5 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import json import json
import gc
import numpy as np import numpy as np
import sympy as sp import sympy as sp
import cereal.messaging as messaging import cereal.messaging as messaging
@ -289,6 +290,8 @@ class Localizer():
def locationd_thread(sm, pm, disabled_logs=None): def locationd_thread(sm, pm, disabled_logs=None):
gc.disable()
if disabled_logs is None: if disabled_logs is None:
disabled_logs = [] disabled_logs = []

@ -1,4 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import gc
import math import math
import json import json
@ -65,6 +66,8 @@ class ParamsLearner:
def main(sm=None, pm=None): def main(sm=None, pm=None):
gc.disable()
if sm is None: if sm is None:
sm = messaging.SubMaster(['liveLocationKalman', 'carState'], poll=['liveLocationKalman']) sm = messaging.SubMaster(['liveLocationKalman', 'carState'], poll=['liveLocationKalman'])
if pm is None: if pm is None:

Loading…
Cancel
Save