Title: Optimizing
Last modified: February 3, 2023

---

# Optimizing

 *  Resolved [zsolt](https://wordpress.org/support/users/zsolt82/)
 * (@zsolt82)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/optimizing-2/)
 * Hello
 * AI Engine: ChatGPT, GPT-3 has become very resource-intensive, consuming a lot
   of memory and slowing down the website loading. Please look into optimizing the
   code
 * Thanks

Viewing 8 replies - 16 through 23 (of 23 total)

[←](https://wordpress.org/support/topic/optimizing-2/?output_format=md) [1](https://wordpress.org/support/topic/optimizing-2/?output_format=md)
2

 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/optimizing-2/page/2/#post-16439017)
 * Hi [@zsolt82](https://wordpress.org/support/users/zsolt82/),
 * Unfortunately, I doubt your issue here is with AI Engine. Disable all the other
   plugins, and try using AI Engine 🙂 It will probably be no issue.
 * And yeah, there is another plugin (or maybe more than one) slowing down your 
   WordPress for 10-15 seconds. It was clear in your screenshots earlier. You should
   absolutely look for the real issue, otherwise you will never find the solution.
 * And yes, those plugins will also slow down the asynchronous queries (so even 
   if the page is loaded, the queries going to your WordPress will be slow as well).
 *  Thread Starter [zsolt](https://wordpress.org/support/users/zsolt82/)
 * (@zsolt82)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/optimizing-2/page/2/#post-16439368)
 * Hello
 * Thank you I turned off all extensions, only the AI engine remained. The site 
   did not significantly speed up and the chatbot response is still slow. So I don’t
   understand Here is the test result: [https://zsizso.hu/aival.JPG](https://zsizso.hu/aival.JPG)
 * When I turn off the AI, the page loads faster and I can navigate in the admin
   area lightning fast.
 * Test result without AI: [https://zsizso.hu/ainelkul.JPG](https://zsizso.hu/ainelkul.JPG)
 * I also tried the third option, which was to turn on all plugins except AI. The
   site did not slow down significantly and the loading time was good.
 * Test result: [https://zsizso.hu/oszpluginenekul.JPG](https://zsizso.hu/oszpluginenekul.JPG)
 * I really like your plugin because it is easy to handle and well thought out. 
   There is no similar plugin that is like this. I do not want to switch, only the
   performance degradation annoys me and I want to find a solution for it.
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/optimizing-2/page/2/#post-16439395)
 * Mmm, I still don’t see why this is happening. I really wonder if it’s something
   coming from my plugin, or maybe just one line of code that your install may not
   like for some reason.
 * Normally, the plugin should be super fast; I love when everything is clean and
   optimized, and I spent a lot of time on performance. This is why I am surprised.
   Clearly, there is something odd, we just need to find it. Unfortunately, you 
   are the only user running into this issue so that makes it hard to debug.
 * Did you try to run AI Engine on another WordPress site? Just by curiosity.
 * Also, for more debugging, could you try this? Code Profiler, this one: [https://wordpress.org/plugins/code-profiler/](https://wordpress.org/plugins/code-profiler/).
 *  Thread Starter [zsolt](https://wordpress.org/support/users/zsolt82/)
 * (@zsolt82)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/optimizing-2/page/2/#post-16439419)
 * Yes And unfortunately, I am experiencing the same problem. I will turn it on 
   on another website now. Please check it out too.
 * [https://aprohirdetes-ingyen.eu/](https://aprohirdetes-ingyen.eu/)
 * This website is much more complex than the previous one, it is slow by default,
   but if I turn on the AI, it deteriorates further.
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/optimizing-2/page/2/#post-16439426)
 * But can you try it on a local install? On a WordPress, which is clean, nothing
   on it?
 * Did you enable Content-Aware or something like this?
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/optimizing-2/page/2/#post-16439436)
 * I might have an idea. I have seen an user with this issue of 10-15 seconds delay
   for nothing, but that was with an entirely different project. But it’s possible
   that it is the same thing.
 * Can you edit the code of the plugin?
 * The **classes/init.php** file. You’ll find this at the beginning of the file:
 *     ```wp-block-code
       if ( session_status() == PHP_SESSION_NONE ) {
         @session_start( ['read_and_close' => true] );
       }
       ```
   
 * Simply remove this (and only this). Try it.
 *  Thread Starter [zsolt](https://wordpress.org/support/users/zsolt82/)
 * (@zsolt82)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/optimizing-2/page/2/#post-16439473)
 * I removed the code and the load decreased, the tests also prove it.
   The chatbot
   response time also decreased, please check it as well.
 * [https://zsizso.hu](https://zsizso.hu)
 * What was the problem?
 * It seems that everything is fine now, I’m glad the problem was solved. Thank 
   you very much.
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/optimizing-2/page/2/#post-16440924)
 * To be honest, I have no idea. As mentioned, I remember having the issues a few
   years ago, and I could find that:
 * [https://stackoverflow.com/questions/10385582/session-start-seems-to-be-very-slow-but-only-sometimes](https://stackoverflow.com/questions/10385582/session-start-seems-to-be-very-slow-but-only-sometimes)
 * This thread is also very old, from almost 11 years ago, and I couldn’t really
   google many potential explanations. However, one person said that:
 * > Sessions also may start slow if you put many data in it. For example 50MB of
   > data in session in docker image may result in 3 seconds of session start time.
 * This might be the reason. In AI Engine, I only keep a very small ID in the session,
   so that’s definitely not doing anything. However, there might be something else
   in your install inflating the session by a lot; maybe old plugins, or something
   else. I am not sure.

Viewing 8 replies - 16 through 23 (of 23 total)

[←](https://wordpress.org/support/topic/optimizing-2/?output_format=md) [1](https://wordpress.org/support/topic/optimizing-2/?output_format=md)
2

The topic ‘Optimizing’ is closed to new replies.

 * ![](https://ps.w.org/ai-engine/assets/icon-256x256.png?rev=3431928)
 * [AI Engine - The Chatbot, AI Framework & MCP for WordPress](https://wordpress.org/plugins/ai-engine/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ai-engine/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ai-engine/)
 * [Active Topics](https://wordpress.org/support/plugin/ai-engine/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ai-engine/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ai-engine/reviews/)

 * 23 replies
 * 2 participants
 * Last reply from: [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/optimizing-2/page/2/#post-16440924)
 * Status: resolved