We have built a BOT, which uses Web Adapter, for loops, data tables. For performance reasons, close the adapter, clean the data tables and exit the loops when logically required for every cycle. Still the BOT slows down after some time (2hrs and beyond). What other performance measures should we take. Looking forward to hear from you.
It certainly sounds like you have a potentially memory leak of some kind. My suggestion would be to open a support request and have one of our support members look at the issue.
As for suggestions, it sounds like you are doing the right things with clearing data, restarting the adapter periodically, and using forLoops (which will clear the memory stack with each iteration). Assuming you don't have any recursive behavior (i.e. code loops where you return to an earlier portion of the automation), then I would imagine the cause is something outside of your control.
You might also examine the application you are automating. Some applications I have encountered have "soft" limits on how many transactions they can handle. Since these are designed for users, the limits are far smaller than what a bot can accomplish.