Occasionally we are asked why some tasks take longer or use more memory on Domino than when users run the code on their local machine. In our experience this usually comes down to which packages are installed. When testing the same version of a package on two different machines, they are not usually equivalent due to the different operating systems. In addition, processes that require copying data will almost always require more memory on Domino because Kubernetes doesn't allow the use of swap memory. This is expected behavior.
If you are concerned about poor performance, you may want to reach out to your local admin just to make sure there aren't other issues at play. The next step would be to look at packages you are using and investigate bug statuses. For example, pandas, a popular package among data scientists, is a notorious memory leaker: pandas memory leaks. Here's another article with a better explanation of pandas memory leakage: Investigating the pandas memory leaks.