I built a Chrome extension to reduce ChatGPT UI lag

codepawl1 pts0 comments

GitHub - nxank4/dechatgpt: Lag free GPT extension · GitHub

/" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

nxank4

dechatgpt

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>1 Commit<br>1 Commit

icons

icons

README.md

README.md

content.css

content.css

content.js

content.js

manifest.json

manifest.json

popup.html

popup.html

popup.js

popup.js

View all files

Repository files navigation

dechatgpt

Chrome extension that cuts paint/layout cost on chatgpt.com when the sidebar<br>fills with chats or a thread grows long. No data leaves your machine.

Why

ChatGPT's UI gets heavy in two predictable ways:

The sidebar #history list keeps every chat row in the DOM with sprite icons<br>and hover state.

Each is a full markdown subtree,<br>and code blocks are live CodeMirror editors — expensive to keep around<br>off-screen.

This extension applies the same content-visibility: auto +<br>contain-intrinsic-size: auto Xpx recipe Claude.ai and ChatGPT's own React<br>code use, plus a JS-managed deferrer for CodeMirror (which carries listeners<br>that paint-skipping alone can't silence), plus a paste interceptor for the<br>ProseMirror composer.

Install

chrome://extensions

Toggle Developer mode on (top right).

Click Load unpacked , point it at this folder.

The icon appears in the toolbar. Open a ChatGPT tab and click it for the<br>feature toggles.

What the toggles do

Toggle<br>What it does

Virtualize sidebar list<br>CSS-only. Browser skips paint for off-screen #history rows.

Virtualize conversation turns<br>CSS-only. content-visibility: auto on each with a 32 px geometric activation buffer.

Defer code blocks<br>JS. Far off-screen .cm-editor blocks are detached to a WeakMap, replaced by a stub at the same height, restored on scroll-in.

Fast paste & type<br>JS + CSS. Intercepts paste on #prompt-textarea and inserts plain text (skips ProseMirror's rich-paste reparse). Adds contain: layout style to the editor.

Kill animations<br>CSS. Strips motion-safe:* transitions and lottie loops. Composer animations preserved.

Code-block buffer<br>px past the viewport at which .cm-editor blocks are detached/restored. Default 4000.

Files

manifest.json MV3 manifest, content_scripts → chatgpt.com + chat.openai.com<br>content.css CSS-only optimizations gated by html.dcgpt-* class flags<br>content.js CodeBlockDeferrer + ComposerOptimizer + storage→class wiring<br>popup.html/js Toggle UI backed by chrome.storage.sync<br>icons/ Toolbar icons

No build step, no npm, no telemetry. Reload the extension after editing files<br>during development.

Privacy

Only storage permission. No network requests, no host_permissions beyond the<br>two content_scripts matches. Settings are stored in chrome.storage.sync so<br>they follow your Chrome profile.

About

Lag free GPT extension

Resources

Readme

Uh oh!

There was an error while loading. Please reload this page.

Activity

Stars

stars

Watchers

watching

Forks

forks

Report repository

Releases

No releases published

Packages

Uh oh!

There was an error while loading. Please reload this page.

Uh oh!

There was an error while loading. Please reload this page.

Contributors

Uh oh!

There was an error while loading. Please reload this page.

Languages

JavaScript<br>56.0%

CSS<br>26.8%

HTML<br>17.2%

You can’t perform that action at this time.

content reload chrome extension chatgpt search

Related Articles