maBOT 10 Posted April 14, 2021 Report Share Posted April 14, 2021 Hello guys, I'm encountering quite unusual issue with CPU consumption for a while now. In my venture to make the code less aggressive, I did literally everything I could thought off, but as it seems to no avail. I did a few additional patches and went to checking the bot's running process in the uBOT Studio software and thought I've resolved the issue given that uBOT was consuming up to 10% of CPU max. but usually it maintains just a few percent of CPU like 3-5%. When I proceeded to compile the same and run as a standalone BOT, the CPU consumption went up and kept it constantly over 30% (oftentimes above 40%). I've recorded the video of the bot running inside the uBOT Studio and the same as standalone compiled BOT. It's astonishing, please check it below: https://drive.google.com/file/d/1NH7P_jxP8qeEy1GFjiAxAOU8L2VQhpVI/view?usp=sharing My machine has pretty much power to be weighted 30 or more percent by a single bot of any kind. Please check the components on this machine: On the other side, I store almost all the defines and code externally with the "Include" plugin, even uiHTML is stored in the .txt file. There are 4 threads in total, which are not heavy at all, and are separated by "wait" commands on each loop - to lessen the CPU burden. I'm using uBOT 5.9.55. Anybody can sched some light on this? Thanks! Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted April 15, 2021 Report Share Posted April 15, 2021 What is the UI of your bot? Is it UIStrap? Quote Link to post Share on other sites
maBOT 10 Posted April 15, 2021 Author Report Share Posted April 15, 2021 10 hours ago, Kreatus (Ubot Ninja) said: What is the UI of your bot? Is it UIStrap? Hi Kojak, Thank you for replying. As far as I know it's a basic HTML and CSS and some JS scripts which I can see. There are 4 tabbed panels. Btw, the UI html starts with the following: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> The size of it, it is 237kb in .txt file. The same is loaded fine and fast in uBOT Studio 5.9.55 and works flawlessly as shown in the video. However in recent versions of uBOT 6 it lags a lot in both, uBOT Studio and compiled bot when I go through the tabs. I think I tried each single uBOT 6 version and it's similar behavior. This is something which other uBOT users reported, so I didn't pay too much attention to it. Do you believe that UI can make this to happen although the same works perfect with a few percent CPU from uBOT Studio? Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted April 16, 2021 Report Share Posted April 16, 2021 Does your UI have lots of input forms? In my experience that's the one causing it. Try to load your compiled bot without UI. Hardcode the variables needed to test it. 1 Quote Link to post Share on other sites
Varo 28 Posted April 16, 2021 Report Share Posted April 16, 2021 You can try on another machine and compare the results. To find the problem is your system or uBot. 1 Quote Link to post Share on other sites
maBOT 10 Posted April 16, 2021 Author Report Share Posted April 16, 2021 5 hours ago, Kreatus (Ubot Ninja) said: Does your UI have lots of input forms? In my experience that's the one causing it. Try to load your compiled bot without UI. Hardcode the variables needed to test it. Not, un/fortunately. There are 23 checkboxes in total. The bot interacts with them upon starting only or if I do a manual interaction. It's a few seconds process which reads the selections from the local .txt file and then stop. I will hardcode the variables I need for it to start and try it out w/o UI. 4 hours ago, Varo said: You can try on another machine and compare the results. To find the problem is your system or uBot. Tried already. It gives the same issue. What I also tested is the older code w/o the new patches to reduce CPU. I've ran the uBOT Studio and standalone BOT, and the CPU was similar in both instances, between 13-20% (pretty high but I got used to it since start). *The older code was also compiled in uBOT 5.9.55. Based on this, it seems the new patches worked fine to reduce the CPU consumption. But for some reason that does not reflect when the BOT is compiled. Are there any other way to compile a BOT or save the code than via the uBOT's inbuilt compiler? it makes me think the problem lies in the compiler process.. uBOT 5.9.55 is the most stable version ever since I'm using the uBOT, but I might need to give it a try to a few older versions and compare the results. Quote Link to post Share on other sites
maBOT 10 Posted April 17, 2021 Author Report Share Posted April 17, 2021 On 4/16/2021 at 4:38 AM, Kreatus (Ubot Ninja) said: Does your UI have lots of input forms? In my experience that's the one causing it. Try to load your compiled bot without UI. Hardcode the variables needed to test it. Gave it a try yesterday by hard-coding the variables. Unluckily, it didn't help. Quote Link to post Share on other sites
maBOT 10 Posted April 21, 2021 Author Report Share Posted April 21, 2021 Hey guys, I'm happy to let you know that the issue has been solved by the help from @LoWrIdErTJ - BotGuru ! He checked the code and recommended removal of the browser's "crash checkers", precisely "auto close browser crash" from Advanced Ubot plugin. Please pay attention to it if you use it. It might eat up half or more of your CPU power. For some reason, the Ubot Studio was ignoring this plugin when running opposite to when it was running as a compiled bot. So, the bot is now running like a charm with 1-2% of CPU usage most of the time! Thanks you all for the support in this venture. 1 Quote Link to post Share on other sites
PRO 69 Posted July 12, 2021 Report Share Posted July 12, 2021 Interesting. Sounds like a task for @pash Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.