Cesar Machado Posted February 16 Share Posted February 16 Friends, when I enable PS_DEBUG_PROFILING my admin is super fast and without it enabled the admin pages load very slowly. It's difficult to understand why when this is active the loading problems are resolved and it shouldn't be like this by default. It's so fast that it's not even possible to find bottlenecks that the tool shows in the footer. Well, I'm studying a way to make PS_DEBUG_PROFILING active only for admin users, and thus guarantee quick operation in the store's routine. So, does anyone know a way to recognize in the defines.inc.php file whether the page accessed is in the backend and thus leave PS_DEBUG_PROFILING set to true? And similarly, if the access is from the frontend, leave PS_DEBUG_PROFILING as false? I tried some things like recognizing the employee ID, but it didn't work. I also tested adding the IP, but the person responsible for the backend could not edit their own IP address all the time. I appreciate anyone who can help me with this for testing. Caesar Link to comment Share on other sites More sharing options...
JPresta.com Posted February 16 Share Posted February 16 You could try this: if (defined('_PS_ADMIN_DIR_')) { define('_PS_DEBUG_PROFILING_', true); } But you will get all profiling informations on each page in the admin. It's not a good solution. 😞 Link to comment Share on other sites More sharing options...
Cesar Machado Posted February 16 Author Share Posted February 16 Thanks for the support. I'm going to test this now and see what the behavior of leaving this active in the admin is like. If it works well when managing products and orders, I think it could be a solution to leave it active. The difference in admin speed is very annoying with this option turned off and I don't know what magic it does when it is active. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now