Script_CoreScripts/ExperienceChatMain Very Slow

In the hangout game On Tap, we are noticing that the CoreScript ExperienceChatMain is taking a lot of CPU time on the Heartbeat event. On the Meta Quest 2 and my BlackBerry KEY2 (Snapdragon 660), the Heatbeat event is taking 15ms to process, and nearly 9ms on my AMD R7 3700X desktop. This is a very significant part of the CPU frame times considering the Meta Quest 2 currently gets 50ms-60ms CPU frame times currently.

This screenshot is from the HTML view from my phone:

This screenshot is a quick one I grabbed on my desktop:

If I were to take a shot in the dark, it would be something within Modules/InGameChat/BubbleChat/Components/BubbleChatBillboard.lua because it has a RunService.Heartbeat event and On Tap uses voice chat. (Made an oversight looking at this, may not be accurate)

A private message is associated with this bug report

50 Likes

I just noticed this yesterday in my games as well:

It’s literally 2x slower than the rest of my place scripts combined.

8 Likes

Has been happening to me as well

8 Likes

I’m having the same issue, where CoreScripts/ExperienceChatMain causes major performance drops in my game. It happens especially with higher player counts, and it keeps happening even when we mute all players in the server. Given the significant performance impact and our limited ability to do anything about it, I believe a fix should be prioritized

8 Likes

Hi, a couple of questions:

  • Are you doing anything custom (i.e. using TextChatService API) in your code?
  • For ExperienceChatMain taking up CPU time on Heartbeat event, is this happening on EVERY heartbeat event?
4 Likes

At least when I reported this (I no longer work on On Tap), no. I made sure to check before and didn’t notice any scripts interacting with the chat. The only system that would make sense is admin commands, and On Tap does not use chat for this.

Yes, but I do need to issue a correction: the Heartbeat job, not the RunService.Heartbeat event. That was an oversight on my end and probably voids my initial guess. The screenshot of the BlackBerry KEY2 microprofiler shows all but 2 frames are maybe 15ms in the delayedThreads section, with 1 random one at nearly 65ms. I believe lots of people using voice chat (i.e. hangout games like On Tap) is a requirement for this issue to manifest, otherwise, this issue would have appeared in many more games I have worked on.

2 Likes

Got it, taking a closer look now!

8 Likes

Is there any update on this? This issue still persists and causes a big impact on performance.

5 Likes

After experimenting a bit… I spawned a bunch of NPCs that say things using ChatService:Chat , after removing these NPCs performance issues still remain.

here is a repro place, spawn around 1000 dummys, make them chat then remove them . Continue this cycle and performance becomes worse and worse.
ExperienceChatMain Bug.rbxl (73.1 KB)

3 Likes

Any update? These issues should be treated as the highest priority possible as they may affect the entire platform…

4 Likes

Hello, I found a good way to reproduce the issue you can call TextChatService:DisplayBubble on every frame and you’ll see that it’ll take around 5ms to complete at first but it’ll then start taking around 15ms. I expect this to not take such a long time.

How to repro use the place file provided and press play, wait around 30 seconds you’ll see that your performance will degrade a lot.

TextChatService_BeingSlowRepro.rbxl (52.6 KB)

After around 30 seconds of the script running
image

Edit: This seems to be another issue from the one being reported here

3 Likes

just loaded into Steam and Steel today. frame time up near 30-40ms…
turned to old chat system fixes it.

1 Like

Some optimization efforts are rolling out within the next few weeks!

10 Likes

Any chance you could fix this widely reported issue that you guys have been ignoring for months? Would be great because right now it’s one of the #1 complaints to do with the new TextChatService, and a massive inconvenience to my game.

8 Likes

Hey I’m sorry to bother,
I’m a bit curious if there is a date in place for when we can expect to see these improvements?

This + this lighting memory leak issue which I think is now resolved? was a big performance problem for my game.

I only ask because this is really affecting performance in games with this new chat system and I’m not sure if I should move to the legacy chat system in the meantime.

my game relies on the new chat system for player tags and more – I’ve thought about moving to the legacy chat system temporarily until this is fixed but converting parts of my game to support the legacy chat system sounds like a bit of a hassle to do and I’m a bit unsure if I should do it especially when this issue is going to be resolved soon.

Thank you for the follow up reply too, I’m excited to see how much better performance is when it ships!

3 Likes

Can confirm I’ve been having these issues in my games as well.

2 Likes

Bump. It happens when a message is sent, when you hover your mouse over the chatbox to make it visible, and even when doing nothing.

1 Like

This issue still persists :(, is there any update on this?

2 Likes

bump. Please please please prioritise and fix this! it is so incredibly slow

2 Likes

We want to move over to the new chat system (from Lua chat), but cannot spend the time converting everything until this is confirmed fixed. Any updates? It’s worrying that people are still saying it’s an issue.

1 Like