robotcodedev / robotcode

RobotFramework support for Visual Studio Code
https://robotcode.io
Apache License 2.0
177 stars 14 forks source link

[BUG] High Memory Usage with Python in RobotCode 0.85.0 #291

Closed RKhadela143 closed 1 month ago

RKhadela143 commented 1 month ago

Description: After updating to RobotCode version 0.85.0, I've noticed that Python is consuming an excessive amount of memory, which results in system hangs and high memory utilization. This issue was not present in the previous version(s) of RobotCode.

Steps to Reproduce: Update to RobotCode 0.85.0. Run a Python script. Observe the memory usage.

Expected Behavior: Memory usage should be consistent with previous versions, without causing system hangs.

Actual Behavior: Python consumes a large amount of memory, leading to system instability.

Environment:RobotCode version: 0.85.0 Python version: 3.10.7 Operating System: Windows 11 Additional Context: No issues were encountered with the previous version of RobotCode.

d-biehl commented 1 month ago

Can you be a little more specific?

What kind of Python script are you running? Why would running a Python script have anything to do with RobotCode? What does this Python script do? Which Python process has a high memory consumption? How do you determine this and why do you think it has something to do with RobotCode?

The normal Python extension also creates Python processes, if you have installed other extensions, they could also use Python.

RKhadela143 commented 1 month ago

Hello,

I am experiencing high memory usage when running automation scripts using the Selenium library and Robot Framework in Visual Studio Code. Specifically, after enabling the Robotcode extension, my system's memory usage jumps from approximately 50% to around 96%. This issue does not occur when the extension is disabled.

Has anyone else encountered this problem? Are there any known solutions or workarounds to reduce the memory usage while using the Robotcode extension?

Thank you for your assistance!

d-biehl commented 1 month ago

Again, Please be a little more precise!

How much RAM do you have? And what is the effect of the system becoming unstable? How big is your project? Does this happen right after enable the extension or when you run a test or script, like described in the first post?

It is normal that when you turn on an extension the RAM requirement increases and 50-96% is a very wide range. Nothing abnormal from my point of view.

RobotCode analyzes the loaded project at startup. Once this has been done, most of the memory is released again, but this can take a while because Python's garbage collector has to clean up first.

d-biehl commented 1 month ago

Any news about this?

RKhadela143 commented 1 month ago

Any news about this?

I've noticed something else related to this issue, but I'm not entirely sure which side it's coming from. I'll close this issue for now and will update here if I gain any insights about the root cause.