pyxcp icon indicating copy to clipboard operation
pyxcp copied to clipboard

Memory usage increases over time

Open tttech-miori opened this issue 3 years ago • 6 comments

It appears that XCP is increasing memory usage over time.

I actually could find at least a couple of spots where allocation happens while never freeing:

  • self.evQueue.append(response) (line 292 of base.py)
  • self.servQueue.append(response) (line 295 of base.py,)
  • self.daqQueue.append (line 314 of base.py)

As far as I understand these queues are mostly / only used for testing only. Is that the case?

As a workaround in my application I can definitely deque them from time to time but it would be nicer to handle that internally / enable them only for debug.

tttech-miori avatar Aug 04 '22 09:08 tttech-miori

version 0.18.48

tttech-miori avatar Aug 04 '22 09:08 tttech-miori

  • self.evQueue.append(response) (line 292 of base.py)
  • self.servQueue.append(response) (line 295 of base.py,)
  • self.daqQueue.append (line 314 of base.py)

In the current implementation you should consume those queues. All the ODTs are placed in the daqQueue

danielhrisca avatar Aug 04 '22 09:08 danielhrisca

I see, thanks for the prompt answer!

Do you think this is going to be changed in the future?

tttech-miori avatar Aug 04 '22 11:08 tttech-miori

I don't think so

danielhrisca avatar Aug 04 '22 11:08 danielhrisca

Currently work in progress -- there'll be a much more flexible callback/callout mechanism in the (near) future. The rekorder extension is one step in this direction (unfortunatly, there are still some C++ - Python integration issues).

christoph2 avatar Aug 08 '22 08:08 christoph2

Thank you for the answers! Have a nice day

tttech-miori avatar Aug 08 '22 08:08 tttech-miori