High memory usage in my theme, how to find out why?

I'm experiencing a problem of high memory usage in my custom WordPress Theme, and I'm trying to find out what's causing it.

I'm already using Query Monitor to explore the situation, but I can't see anything wrong there. No queries that require a long time, (almost) no duplicates, no errors, nothing. I just see a high memory usage (53,701 kB, 41.0% of 131,072 kB server limit, 131.1% of 40,960 kB WordPress limit), and hear my MacBook Pro fan become very loud when I load the site. Also, no errors in my error log.

So my question here is: what could I do to find out what's causing this memory usage? Are there ways to know exactly which parts of my code are causing the problem?

Thank you.

Topic memory Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.