Memory usage sentinel.openai.com

Thanks OsamaEid for tip, deployed it to staging, failed the QA testing, still plugging away at it m cheers

Update,

Decided to go the mitigation route at this time, to keep pushing forward.

  • aggressive memory leak caused by a conflict between OpenAI’s sentinel iframe (used by ChatKit) and browser extensions

The Trigger: When ChatKit loads, it spawns a hidden iframe (sentinel.openai.com) for security.

The Conflict: Browser extensions try to inject their content scripts into this iframe.

The Leak: The iframe fights this injection, creating an infinite loop of new “Detached DOM Trees” and Javascript contexts.

:crossed_swords: The Solution: Lazy Load ChatKit
To stop ChatKit (and the sentinel iframe) from loading until the user actually clicks the chat button.

(DOMContentLoaded) moved into the openChat() function.

Result, only chatkit users suffer memory leak. not passive users

Cheers! all