Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Other Software's File Monitoring Leads to High CPU Usage While Generating Messages #1595

Open
frontier777 opened this issue Nov 1, 2024 · 1 comment

Comments

@frontier777
Copy link

frontier777 commented Nov 1, 2024

I have noticed that after each Chatbox query, my Windows Antimalware Service Executable process goes crazy - enough for my older machine to stutter for a little while (20-30 seconds) until it finishes doing what it's doing.

  1. Go to Chatbox.
  2. Query the AI - I am using OpenAI 4o-mini.
  3. In Task Manager observe the "Antimalware Service Executable - Microsoft Defender Antivirus Service" process immediately start using 100% of a core.

Expected Results
I wouldn't expect the antimalware process to be triggered to this extent, upon each AI query.

Actual Results
System slow down due to above.

Desktop (please complete the following information):

  • Operating System: Windows 10 fully updated
  • Application Version: Chatbox 1.5.1
  • Model: OpenAI chatgpt-4o-mini

Testing
Using Process Monitor I can see the issue may be Chatbox continually calling CreateFile on filenames like these.
C:\Users<username>\AppData\Roaming\xyz.chatboxapp.app\config.json.tmp-0421289212bd01f0
C:\Users<username>\AppData\Roaming\xyz.chatboxapp.app\config.json.tmp-0421289885032997
C:\Users<username>\AppData\Roaming\xyz.chatboxapp.app\config.json.tmp-0421290572318334
C:\Users<username>\AppData\Roaming\xyz.chatboxapp.app\config.json.tmp-04212912532c1376
C:\Users<username>\AppData\Roaming\xyz.chatboxapp.app\config.json.tmp-04212989060e02da

This continues on for 20-30 seconds - well after the AI response has completed, ie. all the while antimalware is triggered, checking these files I assume.

Workaround
I added a Windows Security exclusion on the xyz.chatboxapp.app folder - obviously not ideal.

@frontier777 frontier777 changed the title [BUG] Windows Antimalware high CPU after Chatbox query [BUG] Windows Antimalware high CPU after every Chatbox query Nov 1, 2024
@Bin-Huang
Copy link
Owner

Bin-Huang commented Nov 1, 2024

It looks like this is happening because of how your security software handles JSON files. Chatbox saves conversations as JSON files and updates them frequently while generating messages. Your antivirus software seems to be checking these files very closely, which is what's causing the high CPU usage.

This is pretty common, especially in corporate environments where security settings are strict and closely monitor file changes - particularly web-related files like JSON. It's just how some security software is set up by default, and not actually a problem with Chatbox.

For a quick fix, you could try adding the JSON file to your security software's exception list. Since it's just a plain text file storing chat data, it should be perfectly safe to exclude.

Just so you know, I'm currently working on a new way to store data (probably using SQLite3) that should prevent this kind of issue. Since I need to make it work across Web, iOS, and Android, it might take a while to get everything right.

@Bin-Huang Bin-Huang changed the title [BUG] Windows Antimalware high CPU after every Chatbox query [BUG] Other Software's File Monitoring Leads to High CPU Usage While Generating Messages Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants