 {"id":519428,"date":"2025-09-25T09:12:02","date_gmt":"2025-09-25T16:12:02","guid":{"rendered":"https:\/\/jorgep.com\/blog\/?p=519428"},"modified":"2026-01-05T14:59:02","modified_gmt":"2026-01-05T21:59:02","slug":"why-pc-stalls-when-ai-writes-code","status":"publish","type":"post","link":"https:\/\/jorgep.com\/blog\/why-pc-stalls-when-ai-writes-code\/","title":{"rendered":"Why PC Stalls When AI Writes Code"},"content":{"rendered":"\n<div style=\"font-family: Verdana, Geneva, sans-serif; font-size: 11px;\"><b>Disclaimer<\/b>: \u00a0I work for <a href=\"https:\/\/www.dell.com\/en-us\/work\/learn\/by-service-type-deployment\">Dell Technology Services<\/a> as a Workforce Transformation Solutions Principal.\u00a0 \u00a0 It is my passion to help guide organizations\u00a0through the current technology transition specifically as it relates to <a href=\"https:\/\/www.delltechnologies.com\/en-us\/what-we-do\/workforce-transformation.htm\">Workforce Transformation<\/a>.\u00a0 Visit <a href=\"https:\/\/www.delltechnologies.com\/en-us\/index.htm\">Dell Technologies<\/a>\u00a0site for more information.\u00a0 Opinions are my own and not the views of my employer.<\/div>\n<div><\/div><br>\n\n\n\n<p>I\u2019m a freelance developer (well, kind of semi-professional, <strong>&#8220;Pro-am coder<\/strong>&#8220;, &#8220;<strong>Weekend and late nights warrior developer<\/strong>&#8220;) who loves to vibe code with AI. My go-to teammates are tools like Gemini and Claude, which I rely on for code generation and solving complex problems. It\u2019s an amazing workflow\u2014at least until the moment the AI drops a massive block of code into my browser.<\/p>\n\n\n\n<p>Just last night, while working on a fairly ambitious project, I ran again into a strange slowdown. Whenever the AI generated a large chunk of code in Chrome, my fast, reliable PC suddenly felt like it was sinking in quicksand. The mouse lagged, everything stuttered, and my entire system seemed to grind to a crawl when I was deep into a session. I started calling it: <em>The Mystery of the Stuttering Mouse.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">My Hardware Should Be Enough<\/h2>\n\n\n\n<p>I assumed it had to be a resource bottleneck, but my rig is more than capable:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>CPU: Intel Core i7-9750H (6 cores)<\/li>\n\n\n\n<li>RAM: 32 GB high-speed memory<\/li>\n\n\n\n<li>Background load: just a few Docker containers and services<\/li>\n<\/ul>\n\n\n\n<p>Task Manager showed no red flags. CPU, GPU, and memory usage all looked stable. No spikes, no obvious bottlenecks. I also knew these AI sessions weren\u2019t using local CPU, GPU, or NPU for the heavy lifting\u2014so what was really dragging everything down?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The True Culprit: Browser Main Thread Saturation<\/h2>\n\n\n\n<p>It wasn\u2019t my hardware failing\u2014it was Chrome choking. The slowdown came from a brutal overload on the browser\u2019s <strong>main JavaScript thread<\/strong>, the single-threaded workhorse that handles rendering, input, and page updates.<\/p>\n\n\n\n<p>The Chrome Task Manager revealed the real clue: my AI chat tab alone was chewing up <em>over 1.1 GB of RAM.<\/em><\/p>\n\n\n\n<p>Here\u2019s what\u2019s happening under the hood when the AI streams out big chunks of code:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Rendering Overload:<\/strong> Each large code block sets off a heavy sequence\u2014parsing thousands of tokens, applying syntax highlighting, inserting text, and recalculating layouts in real time. The renderer gets overwhelmed fast.<\/li>\n\n\n\n<li><strong>Input De-Prioritization (a.k.a. Mouse Lag):<\/strong> With the main thread consumed by rendering, it stops giving priority to the OS input queue. Mouse and keyboard events are delayed, producing that sticky, dragging cursor effect.<\/li>\n\n\n\n<li><strong>Memory Bloat:<\/strong> A long chat session builds a massive DOM full of text, formatting, and code. Each new streamed response forces rapid reprocessing of that structure, making updates increasingly expensive.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">My Workflow Fixes<\/h2>\n\n\n\n<p>The solution wasn\u2019t more hardware\u2014it was smarter browser management.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Isolate the AI:<\/strong> I now run AI chats in their own minimalist Chrome profile, with no extra tabs or heavy extensions. This keeps responsiveness high.<\/li>\n\n\n\n<li><strong>Clear the History:<\/strong> If a conversation grows until it hits gigabyte-sized memory use, I start fresh. A clean slate keeps the DOM light and efficient.<\/li>\n\n\n\n<li><strong>Segregate the Work:<\/strong> For heavy AI coding sessions, I work on a secondary machine that I can remote desktop into, dedicated exclusively to browser-based chat coding tasks.<\/li>\n<\/ul>\n\n\n\n<p>If you\u2019re a developer hitting weird slowdowns with AI tools, don\u2019t blame your CPU or RAM. The real bottleneck is almost always the browser\u2019s overwhelmed main thread. Keep your tabs lean, reset long chats, and respect the rendering overhead. Do that, and you\u2019ll get back to smooth, uninterrupted vibe coding.<\/p>\n\n\n\n<p>The search for the optimal coding assistant continues!   Would love to know your thoughts!<\/p>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading519075_3e93d8-da, .wp-block-kadence-advancedheading.kt-adv-heading519075_3e93d8-da[data-kb-block=\"kb-adv-heading519075_3e93d8-da\"]{text-align:center;font-size:var(--global-kb-font-size-md, 1.25rem);line-height:60px;font-style:normal;background-color:#f5a511;}.wp-block-kadence-advancedheading.kt-adv-heading519075_3e93d8-da mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading519075_3e93d8-da[data-kb-block=\"kb-adv-heading519075_3e93d8-da\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.wp-block-kadence-advancedheading.kt-adv-heading519075_3e93d8-da img.kb-inline-image, .wp-block-kadence-advancedheading.kt-adv-heading519075_3e93d8-da[data-kb-block=\"kb-adv-heading519075_3e93d8-da\"] img.kb-inline-image{width:150px;vertical-align:baseline;}<\/style>\n<p class=\"kt-adv-heading519075_3e93d8-da wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading519075_3e93d8-da\">Want More Updates? =>Subscribe to my <a href=\"https:\/\/go.35s.be\/jtb\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>JorgeTechBits  newsletter<\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I\u2019m a freelance developer (well, kind of semi-professional, &#8220;Pro-am coder&#8220;, &#8220;Weekend and late nights warrior developer&#8220;) who loves to vibe code with AI. My go-to teammates are tools like Gemini and Claude, which I rely on for code generation and solving complex problems. It\u2019s an amazing workflow\u2014at least until the moment the AI drops a&#8230;<\/p>\n","protected":false},"author":2,"featured_media":518057,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","episode_type":"","audio_file":"","podmotor_file_id":"","podmotor_episode_id":"","cover_image":"","cover_image_id":"","duration":"","filesize":"","filesize_raw":"","date_recorded":"","explicit":"","block":"","itunes_episode_number":"","itunes_title":"","itunes_season_number":"","itunes_episode_type":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[441],"tags":[471,930,871,986,989],"class_list":["post-519428","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech-talk","tag-ai","tag-ai-series","tag-genai","tag-local-ai","tag-vibe-coding"],"taxonomy_info":{"category":[{"value":441,"label":"Tech Talk"}],"post_tag":[{"value":471,"label":"AI"},{"value":930,"label":"AI Series"},{"value":871,"label":"GenAi"},{"value":986,"label":"Local AI"},{"value":989,"label":"Vibe Coding"}]},"featured_image_src_large":["https:\/\/jorgep.com\/blog\/wp-content\/uploads\/FeaturedImage-VibeCoding.jpg",800,300,false],"author_info":{"display_name":"Jorge Pereira","author_link":"https:\/\/jorgep.com\/blog\/author\/jorge\/"},"comment_info":0,"category_info":[{"term_id":441,"name":"Tech Talk","slug":"tech-talk","term_group":0,"term_taxonomy_id":451,"taxonomy":"category","description":"","parent":0,"count":668,"filter":"raw","cat_ID":441,"category_count":668,"category_description":"","cat_name":"Tech Talk","category_nicename":"tech-talk","category_parent":0}],"tag_info":[{"term_id":471,"name":"AI","slug":"ai","term_group":0,"term_taxonomy_id":481,"taxonomy":"post_tag","description":"","parent":0,"count":140,"filter":"raw"},{"term_id":930,"name":"AI Series","slug":"ai-series","term_group":0,"term_taxonomy_id":940,"taxonomy":"post_tag","description":"","parent":0,"count":144,"filter":"raw"},{"term_id":871,"name":"GenAi","slug":"genai","term_group":0,"term_taxonomy_id":881,"taxonomy":"post_tag","description":"","parent":0,"count":78,"filter":"raw"},{"term_id":986,"name":"Local AI","slug":"local-ai","term_group":0,"term_taxonomy_id":996,"taxonomy":"post_tag","description":"","parent":0,"count":22,"filter":"raw"},{"term_id":989,"name":"Vibe Coding","slug":"vibe-coding","term_group":0,"term_taxonomy_id":999,"taxonomy":"post_tag","description":"","parent":0,"count":13,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/posts\/519428","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/comments?post=519428"}],"version-history":[{"count":3,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/posts\/519428\/revisions"}],"predecessor-version":[{"id":519437,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/posts\/519428\/revisions\/519437"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/media\/518057"}],"wp:attachment":[{"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/media?parent=519428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/categories?post=519428"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jorgep.com\/blog\/wp-json\/wp\/v2\/tags?post=519428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}